diff options
| author | Robert Pluim | 2024-06-24 14:33:30 +0200 |
|---|---|---|
| committer | Robert Pluim | 2024-06-24 14:39:03 +0200 |
| commit | 96e27c2ecf9914cbb9d2e0824adf501082f88ef6 (patch) | |
| tree | 2027ca2b0a4642b469e9d1a3437852868cd45202 | |
| parent | 0715abfa86acb1289074ac7647984941c71759ec (diff) | |
| download | emacs-96e27c2ecf9914cbb9d2e0824adf501082f88ef6.tar.gz emacs-96e27c2ecf9914cbb9d2e0824adf501082f88ef6.zip | |
Don't show char name for multi-char translations
I forgot about shift-translation when implementing this originally, so
this code was being triggered for things like 'C-S-<up>'.
* lisp/help.el (help-key-description): Check if the translation result
is a single char.
(Bug#71411)
| -rw-r--r-- | lisp/help.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/help.el b/lisp/help.el index 878dd404256..adc1724d504 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -883,7 +883,8 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." | |||
| 883 | (let ((otherstring (help--key-description-fontified untranslated))) | 883 | (let ((otherstring (help--key-description-fontified untranslated))) |
| 884 | (if (equal string otherstring) | 884 | (if (equal string otherstring) |
| 885 | string | 885 | string |
| 886 | (if-let ((char-name (char-to-name (aref string 0)))) | 886 | (if-let ((char-name (and (length= string 1) |
| 887 | (char-to-name (aref string 0))))) | ||
| 887 | (format "%s '%s' (translated from %s)" string char-name otherstring) | 888 | (format "%s '%s' (translated from %s)" string char-name otherstring) |
| 888 | (format "%s (translated from %s)" string otherstring))))))) | 889 | (format "%s (translated from %s)" string otherstring))))))) |
| 889 | 890 | ||