4

By using toggle-input-method, I can disable input method when that is active.

But sometimes I just want to disable it regardless the input method status. I couldn't find the function for it. How can I do it?

2
  • I don't understand. You can't disable it if it's not enabled. If it is enabled, toggle-input-method disables it. (deactivate-input-method) is what the toggle command calls when it disables it. That's a plain function rather than a command; but provided it's safe to call at any time, you could write a little wrapper command for it if you particularly want one.
    – phils
    Jun 29, 2016 at 5:01
  • Sorry, maybe that's matter of my poor English. I want to keep it disabled when it's disabled. In the case like this the word disable is not fit, right? Thanks for advice.
    – ironsand
    Jun 29, 2016 at 6:47

1 Answer 1

4

M-x find-function toggle-input-method to read its source code,

(defun toggle-off-input-method ()
  (interactive)
  (if current-input-method (deactivate-input-method)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.