1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

(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.
This commit is contained in:
Glenn Morris 2009-11-14 04:37:00 +00:00
parent 73900d1f61
commit c3583c9456
2 changed files with 9 additions and 17 deletions

View File

@ -1,5 +1,9 @@
2009-11-14 Glenn Morris <rgm@gnu.org>
* emulation/viper.el (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.
* speedbar.el (top-level): Remove unnecessary load of ange-ftp when
compiling.

View File

@ -866,25 +866,17 @@ It also can't undo some Viper settings."
))
;; Tell vc-diff to put *vc* in Vi mode
(if (featurep 'vc)
(defadvice vc-diff (after viper-vc-ad activate)
"Force Vi state in VC diff buffer."
(viper-change-state-to-vi))
(eval-after-load
"vc"
'(defadvice vc-diff (after viper-vc-ad activate)
"Force Vi state in VC diff buffer."
(viper-change-state-to-vi))))
(eval-after-load
"vc"
'(defadvice vc-diff (after viper-vc-ad activate)
"Force Vi state in VC diff buffer."
(viper-change-state-to-vi)))
(eval-after-load
"emerge"
'(defadvice emerge-quit (after viper-emerge-advice activate)
"Run `viper-change-state-to-vi' after quitting emerge."
(viper-change-state-to-vi)))
;; In case Emerge was loaded before Viper.
(defadvice emerge-quit (after viper-emerge-advice activate)
"Run `viper-change-state-to-vi' after quitting emerge."
(viper-change-state-to-vi))
;; passwd.el sets up its own buffer, which turns up in Vi mode,
;; thus overriding the local map. We don't need Vi mode here.
@ -943,10 +935,6 @@ It also can't undo some Viper settings."
'(defadvice rmail-cease-edit (after viper-rmail-advice activate)
"Switch to Emacs state when done editing message."
(viper-change-state-to-emacs)))
;; In case RMAIL was loaded before Viper.
(defadvice rmail-cease-edit (after viper-rmail-advice activate)
"Switch to emacs state when done editing message."
(viper-change-state-to-emacs))
;; ISO accents
;; Need to do it after loading iso-acc, or else this loading will wipe out