emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/setup e1d51a3 07/25: Add (remove VAR) form for :option


From: Stefan Monnier
Subject: [elpa] externals/setup e1d51a3 07/25: Add (remove VAR) form for :option
Date: Wed, 14 Apr 2021 18:49:00 -0400 (EDT)

branch: externals/setup
commit e1d51a3167e63c3c341eccccf5ecf2e44892519d
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@posteo.net>

    Add (remove VAR) form for :option
---
 setup.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/setup.el b/setup.el
index c42943d..bedca73 100644
--- a/setup.el
+++ b/setup.el
@@ -345,6 +345,12 @@ the first FEATURE."
                                 list
                               (cons ,sym list))))
                    load-p t))
+            ((eq (car-safe name) 'remove)
+             (setq name (cadr name)
+                   val `(remove ,name (funcall (or (get ',name 'custom-get)
+                                                   #'symbol-value)
+                                               ',name))
+                   load-p t))
             ((error "Invalid option %S" name)))
       (macroexp-progn
        (append (and load-p `((custom-load-symbol ',name)))
@@ -359,7 +365,10 @@ supported:
 
 (prepend VAR)   Assuming VAR designates a list, add VAL to the
                 beginning, unless it is already member of the
-                list."
+                list.
+
+(remove VAR)    Assuming VAR designates a list, remove all instances
+                of VAL."
   :debug '(sexp form)
   :repeatable t)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]