From: Eli Zaretskii Date: Fri, 18 Aug 2017 09:33:08 +0000 (+0300) Subject: Don't call the same hook twice due to obsolete aliases X-Git-Tag: emacs-26.0.90~425 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e962ca57e0bfe3bc2e319bb03dc0c6a9b1a7c5ee;p=emacs.git 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) --- diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 0d478011238..a67dd4d762f 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -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 () diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index bcbc92844d6..ee31dea69ec 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -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))))) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 036b80eb028..b7f0b156394 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -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) diff --git a/lisp/international/robin.el b/lisp/international/robin.el index 0ef90b18932..077809b6c1f 100644 --- a/lisp/international/robin.el +++ b/lisp/international/robin.el @@ -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.