commit d0b273a546019ca3efd9ce487ce0cc270d8d8a55
parent 9b10512d9dc411dcd5442286c43a9ccfd0cfddb0
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date: Sun, 17 Mar 2024 12:51:53 +0100
Fix broken macro
IIUC the previous version ran customizations immediately during
expansion (ultimately expanding to the last customize-set-variable
value), instead of generating forms that would run those
customizations at appropriate times.
Guess I never run Emacs <29 π
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.emacs b/.emacs
@@ -19,8 +19,9 @@
(if (fboundp 'setopt)
(defalias 'my/setopt 'setopt)
(defmacro my/setopt (&rest pairs)
- (while pairs
- (customize-set-variable (pop pairs) (pop pairs)))))
+ `(let ((pairs (quote ,pairs)))
+ (while pairs
+ (customize-set-variable (pop pairs) (pop pairs))))))
;; Some list variables I don't set via Custom. I can't tell Custom
;; "add this element, take those two away": I need to "set in stone"