summaryrefslogtreecommitdiff
path: root/lisp/emulation/viper.el
diff options
context:
space:
mode:
authorPhillip Lord <phillip.lord@russet.org.uk>2016-05-27 16:49:12 +0100
committerPhillip Lord <phillip.lord@russet.org.uk>2016-05-27 16:49:12 +0100
commit01f375386d74af896d427e2c6899df20c78b3850 (patch)
tree6d8909a95b3897850e8b07459a3adb755f0af5d4 /lisp/emulation/viper.el
parentee297210cffb9e8d05912686a39fa158414ba050 (diff)
downloademacs-01f375386d74af896d427e2c6899df20c78b3850.tar.gz
Fix broken viper deactivation
* lisp/emulation/viper.el (viper--deactivate-advice-list): Destructure args to advice-remove. (viper--advice-add): Use cons not list. Addresses bug#23625
Diffstat (limited to 'lisp/emulation/viper.el')
-rw-r--r--lisp/emulation/viper.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index a0bba9a22e6..1ee1464ac73 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -647,10 +647,14 @@ This startup message appears whenever you load Viper, unless you type `y' now."
(defun viper--advice-add (function where advice)
(advice-add function where advice)
- (push (list function advice) viper--advice-list))
+ (push (cons function advice) viper--advice-list))
(defun viper--deactivate-advice-list ()
- (mapc #'advice-remove viper--advice-list)
+ (mapc (lambda (n)
+ (advice-remove
+ (car n)
+ (cdr n)))
+ viper--advice-list)
(setq viper--advice-list nil))
(defun viper-go-away ()