summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Junke <christophe.junke@parrot.com>2018-12-03 17:32:04 +0100
committerChristophe Junke <christophe.junke@parrot.com>2018-12-03 17:32:04 +0100
commit1e2cc98dce3821b6b1de2ede3f9d0a3dff4b012f (patch)
treea9a98a5d04284e83b34f1d74c469c90e25e7677a
parentc4c2c355d23fb0420058343754e68901dc8c3c28 (diff)
downloadparrot-1e2cc98dce3821b6b1de2ede3f9d0a3dff4b012f.tar.gz
Use acons+remove instead of pushnew, to allow redefinitions
-rw-r--r--parrot-alchemy.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/parrot-alchemy.el b/parrot-alchemy.el
index 047baa9..ec41f53 100644
--- a/parrot-alchemy.el
+++ b/parrot-alchemy.el
@@ -235,9 +235,13 @@ exists."
;; to reset defvars, does not reach defvar forms inside progns.
(when (boundp ',popup-name)
(makunbound ',popup-name))
- (pushnew (cons ,path ',popup-name)
- *alchemy-path-relative-popups*
- :test 'equalp)
+ ;; unlike pushnew, allow redefinitions
+ (setf *alchemy-path-relative-popups*
+ (acons ,path
+ ',popup-name
+ (cl-remove (cons ',path ',popup-name)
+ *alchemy-path-relative-popups*
+ :test 'equalp)))
(magit-define-popup ,popup-name ,name
:switches alchemy-specific-switches
:options alchemy-specific-options