diff options
| author | Glenn Morris | 2009-11-14 04:37:00 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-11-14 04:37:00 +0000 |
| commit | c3583c9456869da4a1bc3b5c908d0286f8bb5edf (patch) | |
| tree | 350c7609ae27d114066e7784b5972270243d6ffc | |
| parent | 73900d1f61e400cdb041c060afa831fa17b84b33 (diff) | |
| download | emacs-c3583c9456869da4a1bc3b5c908d0286f8bb5edf.tar.gz emacs-c3583c9456869da4a1bc3b5c908d0286f8bb5edf.zip | |
(viper-set-hooks): Remove duplicate advice statements for vc-diff,
emerge-quit, and rmail-cease-edit. If they are already loaded,
eval-after-load will do the right thing.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 22 |
2 files changed, 9 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24e9ebb3d1e..fcaa469bf87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2009-11-14 Glenn Morris <rgm@gnu.org> | 1 | 2009-11-14 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * emulation/viper.el (viper-set-hooks): Remove duplicate advice | ||
| 4 | statements for vc-diff, emerge-quit, and rmail-cease-edit. | ||
| 5 | If they are already loaded, eval-after-load will do the right thing. | ||
| 6 | |||
| 3 | * speedbar.el (top-level): Remove unnecessary load of ange-ftp when | 7 | * speedbar.el (top-level): Remove unnecessary load of ange-ftp when |
| 4 | compiling. | 8 | compiling. |
| 5 | 9 | ||
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index c6194c65bdc..24ed2dc80ba 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -866,25 +866,17 @@ It also can't undo some Viper settings." | |||
| 866 | )) | 866 | )) |
| 867 | 867 | ||
| 868 | ;; Tell vc-diff to put *vc* in Vi mode | 868 | ;; Tell vc-diff to put *vc* in Vi mode |
| 869 | (if (featurep 'vc) | 869 | (eval-after-load |
| 870 | (defadvice vc-diff (after viper-vc-ad activate) | 870 | "vc" |
| 871 | "Force Vi state in VC diff buffer." | 871 | '(defadvice vc-diff (after viper-vc-ad activate) |
| 872 | (viper-change-state-to-vi)) | 872 | "Force Vi state in VC diff buffer." |
| 873 | (eval-after-load | 873 | (viper-change-state-to-vi))) |
| 874 | "vc" | ||
| 875 | '(defadvice vc-diff (after viper-vc-ad activate) | ||
| 876 | "Force Vi state in VC diff buffer." | ||
| 877 | (viper-change-state-to-vi)))) | ||
| 878 | 874 | ||
| 879 | (eval-after-load | 875 | (eval-after-load |
| 880 | "emerge" | 876 | "emerge" |
| 881 | '(defadvice emerge-quit (after viper-emerge-advice activate) | 877 | '(defadvice emerge-quit (after viper-emerge-advice activate) |
| 882 | "Run `viper-change-state-to-vi' after quitting emerge." | 878 | "Run `viper-change-state-to-vi' after quitting emerge." |
| 883 | (viper-change-state-to-vi))) | 879 | (viper-change-state-to-vi))) |
| 884 | ;; In case Emerge was loaded before Viper. | ||
| 885 | (defadvice emerge-quit (after viper-emerge-advice activate) | ||
| 886 | "Run `viper-change-state-to-vi' after quitting emerge." | ||
| 887 | (viper-change-state-to-vi)) | ||
| 888 | 880 | ||
| 889 | ;; passwd.el sets up its own buffer, which turns up in Vi mode, | 881 | ;; passwd.el sets up its own buffer, which turns up in Vi mode, |
| 890 | ;; thus overriding the local map. We don't need Vi mode here. | 882 | ;; thus overriding the local map. We don't need Vi mode here. |
| @@ -943,10 +935,6 @@ It also can't undo some Viper settings." | |||
| 943 | '(defadvice rmail-cease-edit (after viper-rmail-advice activate) | 935 | '(defadvice rmail-cease-edit (after viper-rmail-advice activate) |
| 944 | "Switch to Emacs state when done editing message." | 936 | "Switch to Emacs state when done editing message." |
| 945 | (viper-change-state-to-emacs))) | 937 | (viper-change-state-to-emacs))) |
| 946 | ;; In case RMAIL was loaded before Viper. | ||
| 947 | (defadvice rmail-cease-edit (after viper-rmail-advice activate) | ||
| 948 | "Switch to emacs state when done editing message." | ||
| 949 | (viper-change-state-to-emacs)) | ||
| 950 | 938 | ||
| 951 | ;; ISO accents | 939 | ;; ISO accents |
| 952 | ;; Need to do it after loading iso-acc, or else this loading will wipe out | 940 | ;; Need to do it after loading iso-acc, or else this loading will wipe out |