From 8aee678247edab614151b0c95deb8868ccd4c099 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 25 Apr 2024 18:13:16 +0200 Subject: [PATCH] Avoid propertizing symbol names when dimming hyphens * lisp/simple.el (read-extended-command--affixation): Propertize a copy of the command name instead of the original string. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 4ca2e4b9253..978ed0638e2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2558,10 +2558,10 @@ or (if one of MODES is a minor mode), if it is switched on in BUFFER." 'completions-annotations))) (t "")))) (when extended-command-dim-hyphens + (setq command-name (copy-sequence command-name)) (named-let dim ((hy (string-search "-" command-name))) (when hy - (add-face-text-property hy (1+ hy) - 'dim-hyphen nil command-name) + (add-face-text-property hy (1+ hy) 'dim-hyphen nil command-name) (dim (string-search "-" command-name (1+ hy)))))) (list command-name "" suffix))) command-names))) -- 2.39.5