Commit c3583c94 authored by Glenn Morris's avatar Glenn Morris
Browse files

(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.
parent 73900d1f
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.
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment