[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#72077: 30.0.60; customizing which-key-dont-use-unicode to nil result
From: |
Philip Kaludercic |
Subject: |
bug#72077: 30.0.60; customizing which-key-dont-use-unicode to nil results in nil which-key-separator |
Date: |
Sat, 13 Jul 2024 12:48:36 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> Cc: Philip Kaludercic <philipk@posteo.net>
>> From: Robert Pluim <rpluim@gmail.com>
>> Date: Fri, 12 Jul 2024 16:31:46 +0200
>>
>>
>> mkdir /tmp/emacs-30
>> HOME=/tmp/emacs-30 src/emacs
>> M-x which-key-mode
>> M-x customize-variable which-key-dont-use-unicode RET
>>
>> toggle it to nil, save it, resulting in the following .emacs:
>>
>> ;;; -*- lexical-binding: t -*-
>> (custom-set-variables
>> ;; custom-set-variables was added by Custom.
>> ;; If you edit it by hand, you could mess it up, so be careful.
>> ;; Your init file should contain only one such instance.
>> ;; If there is more than one, they won't work right.
>> '(which-key-dont-use-unicode nil))
>> (custom-set-faces
>> ;; custom-set-faces was added by Custom.
>> ;; If you edit it by hand, you could mess it up, so be careful.
>> ;; Your init file should contain only one such instance.
>> ;; If there is more than one, they won't work right.
>> )
>>
>> C-x <pause> shows which-key using ?→ as separator
>>
>> <exit emacs>
>>
>> HOME=/tmp/emacs-30 src/emacs
>>
>> C-h v which-key-dont-use-unicode RET
>>
>> which-key-dont-use-unicode is a variable defined in ‘which-key.el’.
>>
>> Its value is nil
>> Original value was t
>>
>> C-h v which-key-separator RET
>>
>> which-key-separator is a variable defined in ‘which-key.el’.
>>
>> Its value is nil
>> Original value was " → "
>>
>> C-h v which-key-ellipsis RET
>>
>> which-key-ellipsis is a variable defined in ‘which-key.el’.
>>
>> Its value is nil
>> Original value was "…"
>>
>> M-x which-key-mode
>> C-x <pause> shows which-key using 'nil' as separator
>
> Justin, any comments or suggestions?
This one is on me, I tweaked the 'which-key-dont-use-unicode' user
option.
The issue here seems to be that `custom-reevaluate-setting' always sets
a value, even if there is no `standard-value' associated with a user
option. I don't know if we want to change that (certainly not on the
release branch), but a quick fix seems to be this:
diff --git a/lisp/which-key.el b/lisp/which-key.el
index 973616ef116..49c22be216a 100644
--- a/lisp/which-key.el
+++ b/lisp/which-key.el
@@ -130,9 +130,10 @@ which-key-dont-use-unicode
`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")
--
Philip Kaludercic on peregrine