From 9cfad306b6127808c0eb76503b436b13fc023f4c Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 24 Jun 2024 14:33:30 +0200 Subject: [PATCH] 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-'. * lisp/help.el (help-key-description): Check if the translation result is a single char. (Bug#71411) (cherry picked from commit 96e27c2ecf9914cbb9d2e0824adf501082f88ef6) --- lisp/help.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/help.el b/lisp/help.el index 021d83f0705..94926555c0f 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1020,7 +1020,8 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." (let ((otherstring (help--key-description-fontified untranslated))) (if (equal string otherstring) string - (if-let ((char-name (char-to-name (aref string 0)))) + (if-let ((char-name (and (length= string 1) + (char-to-name (aref string 0))))) (format "%s '%s' (translated from %s)" string char-name otherstring) (format "%s (translated from %s)" string otherstring))))))) -- 2.39.2