From 1ae2f004473c1cc26ab654481716c9efb4ecd8de Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 26 Jul 2024 23:26:14 +0200 Subject: [PATCH] Fix edge-case with 'which-key-dont-use-unicode' setter * 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) --- lisp/which-key.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/which-key.el b/lisp/which-key.el index 37b42a009f7..34de676616f 100644 --- a/lisp/which-key.el +++ b/lisp/which-key.el @@ -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")