diff options
| author | Romain Francoise | 2005-10-23 12:47:11 +0000 |
|---|---|---|
| committer | Romain Francoise | 2005-10-23 12:47:11 +0000 |
| commit | 90066cb5e0f95f5c304af749abcb100afec5a49c (patch) | |
| tree | 1614c5c7bb762e23293571299a803ad1ffd12a29 | |
| parent | 9bc260cfb76b5bbe39a3edf1b3933e4be11de759 (diff) | |
| download | emacs-90066cb5e0f95f5c304af749abcb100afec5a49c.tar.gz emacs-90066cb5e0f95f5c304af749abcb100afec5a49c.zip | |
(viper-set-hooks): Quote forms passed to `eval-after-load' to avoid
evaluating their result.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 78 |
2 files changed, 44 insertions, 39 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3e7f75b5e6..6aba6ead9e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-10-23 Romain Francoise <romain@orebokech.com> | ||
| 2 | |||
| 3 | * emulation/viper.el (viper-set-hooks): Quote forms passed to | ||
| 4 | `eval-after-load' to avoid evaluating their result. | ||
| 5 | |||
| 1 | 2005-10-23 Michael Albinus <michael.albinus@gmx.de> | 6 | 2005-10-23 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * files.el (directory-listing-before-filename-regexp): New | 8 | * files.el (directory-listing-before-filename-regexp): New |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index a361469382e..71b9347b8b0 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -942,55 +942,55 @@ It also can't undo some Viper settings." | |||
| 942 | ;; the advice. | 942 | ;; the advice. |
| 943 | (eval-after-load | 943 | (eval-after-load |
| 944 | "iso-acc" | 944 | "iso-acc" |
| 945 | (defadvice iso-accents-mode (around viper-iso-accents-advice activate) | 945 | '(defadvice iso-accents-mode (around viper-iso-accents-advice activate) |
| 946 | "Set viper-automatic-iso-accents to iso-accents-mode." | 946 | "Set viper-automatic-iso-accents to iso-accents-mode." |
| 947 | (let ((arg (ad-get-arg 0))) | 947 | (let ((arg (ad-get-arg 0))) |
| 948 | ad-do-it | 948 | ad-do-it |
| 949 | (setq viper-automatic-iso-accents | 949 | (setq viper-automatic-iso-accents |
| 950 | (if (eq viper-current-state 'vi-state) | 950 | (if (eq viper-current-state 'vi-state) |
| 951 | (if arg | 951 | (if arg |
| 952 | ;; if iso-accents-mode was called with positive arg, turn | 952 | ;; if iso-accents-mode was called with positive arg, turn |
| 953 | ;; accents on | 953 | ;; accents on |
| 954 | (> (prefix-numeric-value arg) 0) | 954 | (> (prefix-numeric-value arg) 0) |
| 955 | ;; else: toggle viper-automatic-iso-accents | 955 | ;; else: toggle viper-automatic-iso-accents |
| 956 | (not viper-automatic-iso-accents)) | 956 | (not viper-automatic-iso-accents)) |
| 957 | ;; other states: accept what iso-accents-mode has done | 957 | ;; other states: accept what iso-accents-mode has done |
| 958 | iso-accents-mode)) | 958 | iso-accents-mode)) |
| 959 | ;; turn off ISO accents in vi-state | 959 | ;; turn off ISO accents in vi-state |
| 960 | (if (eq viper-current-state 'vi-state) | 960 | (if (eq viper-current-state 'vi-state) |
| 961 | (viper-set-iso-accents-mode nil)) | 961 | (viper-set-iso-accents-mode nil)) |
| 962 | (if (memq viper-current-state '(vi-state insert-state replace-state)) | 962 | (if (memq viper-current-state '(vi-state insert-state replace-state)) |
| 963 | (message "Viper ISO accents mode: %s" | 963 | (message "Viper ISO accents mode: %s" |
| 964 | (if viper-automatic-iso-accents "on" "off"))) | 964 | (if viper-automatic-iso-accents "on" "off"))) |
| 965 | ))) | 965 | ))) |
| 966 | 966 | ||
| 967 | ;; International input methods | 967 | ;; International input methods |
| 968 | (if viper-emacs-p | 968 | (if viper-emacs-p |
| 969 | (eval-after-load "mule-cmds" | 969 | (eval-after-load "mule-cmds" |
| 970 | (progn | 970 | '(progn |
| 971 | (defadvice inactivate-input-method (after viper-mule-advice activate) | 971 | (defadvice inactivate-input-method (after viper-mule-advice activate) |
| 972 | "Set viper-special-input-method to disable intl. input methods." | 972 | "Set viper-special-input-method to disable intl. input methods." |
| 973 | (viper-inactivate-input-method-action)) | 973 | (viper-inactivate-input-method-action)) |
| 974 | (defadvice activate-input-method (after viper-mule-advice activate) | 974 | (defadvice activate-input-method (after viper-mule-advice activate) |
| 975 | "Set viper-special-input-method to enable intl. input methods." | 975 | "Set viper-special-input-method to enable intl. input methods." |
| 976 | (viper-activate-input-method-action)) | 976 | (viper-activate-input-method-action)) |
| 977 | )) | 977 | )) |
| 978 | ;; XEmacs Although these hooks exist in Emacs, they don't seem to be always | 978 | ;; XEmacs Although these hooks exist in Emacs, they don't seem to be always |
| 979 | ;; called on input-method activation/deactivation, so we the above advise | 979 | ;; called on input-method activation/deactivation, so we the above advise |
| 980 | ;; functions instead. | 980 | ;; functions instead. |
| 981 | (eval-after-load "mule-cmds" | 981 | (eval-after-load "mule-cmds" |
| 982 | (progn | 982 | '(progn |
| 983 | (add-hook 'input-method-activate-hook | 983 | (add-hook 'input-method-activate-hook |
| 984 | 'viper-activate-input-method-action t) | 984 | 'viper-activate-input-method-action t) |
| 985 | (add-hook 'input-method-inactivate-hook | 985 | (add-hook 'input-method-inactivate-hook |
| 986 | 'viper-inactivate-input-method-action t))) | 986 | 'viper-inactivate-input-method-action t))) |
| 987 | ) | 987 | ) |
| 988 | (eval-after-load "mule-cmds" | 988 | (eval-after-load "mule-cmds" |
| 989 | (defadvice toggle-input-method (around viper-mule-advice activate) | 989 | '(defadvice toggle-input-method (around viper-mule-advice activate) |
| 990 | "Adjust input-method toggling in vi-state." | 990 | "Adjust input-method toggling in vi-state." |
| 991 | (if (and viper-special-input-method (eq viper-current-state 'vi-state)) | 991 | (if (and viper-special-input-method (eq viper-current-state 'vi-state)) |
| 992 | (viper-inactivate-input-method) | 992 | (viper-inactivate-input-method) |
| 993 | ad-do-it))) | 993 | ad-do-it))) |
| 994 | 994 | ||
| 995 | ) ; viper-set-hooks | 995 | ) ; viper-set-hooks |
| 996 | 996 | ||