Don't call the same hook twice due to obsolete aliases

* lisp/international/robin.el (robin-activate):
* lisp/international/quail.el (quail-activate):
* lisp/international/mule-cmds.el (deactivate-input-method):
* lisp/emulation/viper-init.el (viper-deactivate-input-method):
Don't call the same hook twice, when the obsolete and the
advertised symbols are aliased.  (Bug#28118)
This commit is contained in:
Eli Zaretskii 2017-08-18 12:33:08 +03:00
parent fb1a489757
commit e962ca57e0
4 changed files with 4 additions and 12 deletions

View file

@ -344,9 +344,7 @@ Use `\\[viper-set-expert-level]' to change this.")
(quail-delete-overlays))
(setq describe-current-input-method-function nil)
(setq current-input-method nil)
(run-hooks
'input-method-inactivate-hook ; for backward compatibility
'input-method-deactivate-hook)
(run-hooks 'input-method-deactivate-hook)
(force-mode-line-update))
))
(defun viper-activate-input-method ()

View file

@ -1482,9 +1482,7 @@ If INPUT-METHOD is nil, deactivate any current input method."
current-input-method-title nil)
(funcall deactivate-current-input-method-function))
(unwind-protect
(run-hooks
'input-method-inactivate-hook ; for backward compatibility
'input-method-deactivate-hook)
(run-hooks 'input-method-deactivate-hook)
(setq current-input-method nil)
(force-mode-line-update)))))

View file

@ -569,9 +569,7 @@ While this input method is active, the variable
(setq describe-current-input-method-function nil)
(quail-hide-guidance)
(remove-hook 'post-command-hook 'quail-show-guidance t)
(run-hooks
'quail-inactivate-hook ; for backward compatibility
'quail-deactivate-hook))
(run-hooks 'quail-deactivate-hook))
(kill-local-variable 'input-method-function))
;; Let's activate Quail input method.
(if (null quail-current-package)

View file

@ -413,9 +413,7 @@ While this input method is active, the variable
(progn
(setq robin-mode nil)
(setq describe-current-input-method-function nil)
(run-hooks
'robin-inactivate-hook ; for backward compatibility
'robin-deactivate-hook))
(run-hooks 'robin-deactivate-hook))
(kill-local-variable 'input-method-function))
;; activate robin input method.