]> code.delx.au - gnu-emacs/commitdiff
Fix broken viper deactivation
authorPhillip Lord <phillip.lord@russet.org.uk>
Fri, 27 May 2016 15:49:12 +0000 (16:49 +0100)
committerPhillip Lord <phillip.lord@russet.org.uk>
Fri, 27 May 2016 15:49:12 +0000 (16:49 +0100)
* lisp/emulation/viper.el (viper--deactivate-advice-list): Destructure
  args to advice-remove.
  (viper--advice-add): Use cons not list.

Addresses bug#23625

lisp/emulation/viper.el

index a0bba9a22e62555065d18494f4b70906eff8c2ac..1ee1464ac73eaf6c0aec9bd1f80babd777710cc6 100644 (file)
@@ -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 ()