From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72077@debbugs.gnu.org, Robert Pluim <rpluim@gmail.com>,
Justin Burkett <justin@burkett.cc>
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 [thread overview]
Message-ID: <87v819o3tn.fsf@posteo.net> (raw)
In-Reply-To: <86o771jxtb.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Jul 2024 15:12:00 +0300")
[-- Attachment #1: Type: text/plain, Size: 2199 bytes --]
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:
[-- Attachment #2: Type: text/plain, Size: 685 bytes --]
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")
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
Philip Kaludercic on peregrine
next prev parent reply other threads:[~2024-07-13 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 14:31 bug#72077: 30.0.60; customizing which-key-dont-use-unicode to nil results in nil which-key-separator Robert Pluim
2024-07-13 12:12 ` Eli Zaretskii
2024-07-13 12:48 ` Philip Kaludercic [this message]
2024-07-15 7:25 ` Robert Pluim
2024-07-26 21:27 ` Philip Kaludercic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v819o3tn.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=72077@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=justin@burkett.cc \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.