From: Glenn Morris Date: Sat, 14 Nov 2009 04:37:00 +0000 (+0000) Subject: (viper-set-hooks): Remove duplicate advice statements for vc-diff, X-Git-Tag: emacs-pretest-23.1.90~439 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c3583c9456869da4a1bc3b5c908d0286f8bb5edf;p=emacs.git (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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24e9ebb3d1e..fcaa469bf87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2009-11-14 Glenn Morris + * 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. 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." )) ;; 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