From 76409ca9daf72b697db9c1983aa322a365bfc066 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Thu, 26 May 2016 22:18:32 +0100 Subject: [PATCH] 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 --- lisp/emulation/viper.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index a0bba9a..1ee1464 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -647,10 +647,14 @@ viper--advice-list (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 () -- 2.8.3