]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix describe-char-fold-equivalences for composed characters
authorRobert Pluim <rpluim@gmail.com>
Wed, 31 Aug 2022 16:08:49 +0000 (18:08 +0200)
committerRobert Pluim <rpluim@gmail.com>
Wed, 31 Aug 2022 16:38:04 +0000 (18:38 +0200)
* lisp/char-fold.el (describe-char-fold-equivalences): Map
`get-char-code-property' across all the component codepoints of the
equivalent character rather than just the first one.

lisp/char-fold.el

index 4e3aa058fcb301eb2af18bf16d28b8c2cb33755c..b2002826f7315137470753be0f67a15001c6bc11 100644 (file)
@@ -469,13 +469,18 @@ non-canonical equivalences."
       (with-help-window (help-buffer)
         (with-current-buffer standard-output
           (if char
-              (insert (mapconcat
-                       (lambda (c)
-                         (format "%s: \?\\N{%s}\n"
-                                 c
-                                 (or (get-char-code-property (string-to-char c) 'name)
-                                     (get-char-code-property (string-to-char c) 'old-name))))
-                       equivalences))
+              (insert
+               (mapconcat
+                (lambda (c)
+                  (format "%s: %s\n"
+                          c
+                          (mapconcat
+                           (lambda (ch)
+                             (format "?\\N{%s}"
+                                     (or (get-char-code-property ch 'name)
+                                         (get-char-code-property ch 'old-name))))
+                           c)))
+                equivalences))
             (insert "A list of char-fold equivalences for `char-fold-to-regexp':\n\n")
             (setq-local bidi-paragraph-direction 'left-to-right)
             (dolist (equiv (nreverse equivalences))