]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid propertizing symbol names when dimming hyphens
authorEshel Yaron <me@eshelyaron.com>
Thu, 25 Apr 2024 16:13:16 +0000 (18:13 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 25 Apr 2024 16:13:16 +0000 (18:13 +0200)
* lisp/simple.el (read-extended-command--affixation): Propertize
a copy of the command name instead of the original string.

lisp/simple.el

index 4ca2e4b9253a30f78fbad9da7f02adca8d566cc7..978ed0638e2ba8e928abc2424feb75dfd1c6de00 100644 (file)
@@ -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)))