emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 90f76eb: describe-char: unambiguous name for insert


From: Stephen Berman
Subject: [Emacs-diffs] master 90f76eb: describe-char: unambiguous name for inserting ASCII 7
Date: Wed, 8 Feb 2017 16:38:54 -0500 (EST)

branch: master
commit 90f76eb3584ef1fda727bcd0dd74c5324a11a59d
Author: Stephen Berman <address@hidden>
Commit: Stephen Berman <address@hidden>

    describe-char: unambiguous name for inserting ASCII 7
    
    * lisp/descr-text.el (describe-char): Make the input
    suggestion for inserting ASCII character 7 by name use the
    unambiguous name "BELL (BEL)" (bug#25641).
---
 lisp/descr-text.el | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 3971dbb..6a6a8ea 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -616,10 +616,18 @@ relevant to POS."
                                    'help-args '(,current-input-method))
                                 "input method")
                         (list
-                          (let ((name
-                                 (or (get-char-code-property char 'name)
-                                     (get-char-code-property char 'old-name))))
-                            (if (and name (assoc-string name (ucs-names)))
+                          (let* ((names (ucs-names))
+                                 (name
+                                  (or (when (= char 7)
+                                      ;; Special case for "BELL" which is
+                                      ;; apparently the only char which
+                                      ;; doesn't have a new name and whose
+                                      ;; old-name is shadowed by a newer char
+                                      ;; with that name (bug#25641).
+                                      (car (rassoc char names)))
+                                      (get-char-code-property char 'name)
+                                      (get-char-code-property char 
'old-name))))
+                            (if (and name (assoc-string name names))
                                 (format
                                  "type \"C-x 8 RET %x\" or \"C-x 8 RET %s\""
                                  char name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]