]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix edge-case with 'which-key-dont-use-unicode' setter
authorPhilip Kaludercic <philipk@posteo.net>
Fri, 26 Jul 2024 21:26:14 +0000 (23:26 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 27 Jul 2024 12:03:10 +0000 (14:03 +0200)
* lisp/which-key.el (which-key-dont-use-unicode): Check if the
user options have a 'standard-value' before proceeding to
reevaluate.  This avoids accidentally setting the symbol value
to nil, before the user option has been declared, overriding the
actual non-nil, default values.  (Bug#72077)

(cherry picked from commit 1ae2f004473c1cc26ab654481716c9efb4ecd8de)

lisp/which-key.el

index 198a92fe36c72c5e2ab17171a26e49045c325a93..f3f437eb7d21eca1aab6845dd4690422f783cd03 100644 (file)
@@ -130,9 +130,10 @@ For affected settings, see `which-key-replacement-alist', `which-key-ellipsis'
 `which-key-separator'."
   :set (lambda (sym val)
          (custom-set-default sym val)
-         (mapc #'custom-reevaluate-setting
-               '(which-key-separator
-                 which-key-ellipsis)))
+         (dolist (sym '(which-key-separator
+                        which-key-ellipsis))
+           (when (get sym 'standard-value)
+             (custom-reevaluate-setting sym))))
   :initialize #'custom-initialize-changed
   :type 'boolean
   :package-version "1.0" :version "30.1")