Use 'char-to-name'
authorRobert Pluim <rpluim@gmail.com>
Fri, 7 Jun 2024 10:07:50 +0000 (12:07 +0200)
committerRobert Pluim <rpluim@gmail.com>
Tue, 11 Jun 2024 09:06:37 +0000 (11:06 +0200)
* lisp/international/emoji.el (emoji--name): Lookup name using 'char-to-name'.
* lisp/international/textsec.el (textsec-domain-suspicious-p): And here.
* lisp/simple.el (what-cursor-position): And here.

lisp/international/emoji.el
lisp/international/textsec.el
lisp/simple.el

index 4f3aab5a6be645e9e7345c39153c3bf9953c1659..cbf7c547f4cfc5d82f93a8eaba49fb71e78676f9 100644 (file)
@@ -245,7 +245,7 @@ the name is not known."
 
 (defun emoji--name (glyph)
   (or (gethash glyph emoji--names)
-      (get-char-code-property (aref glyph 0) 'name)))
+      (char-to-name (aref glyph 0))))
 
 (defvar-keymap emoji-list-mode-map
   "RET" #'emoji-list-select
index 4740dd8134584d618ed24dd6f37c6565fe8f99a2..224363732fed4449d0e5bc0ea7c8ddd004134f71 100644 (file)
@@ -296,7 +296,7 @@ or use certain other unusual mixtures of characters."
                             ""
                           (concat ": " (string char)))
                         char
-                        (get-char-code-property char 'name)))))
+                        (char-to-name char)))))
      domain)
     ;; Does IDNA allow it?
     (unless (puny-highly-restrictive-domain-p domain)
index 171ef96351fba7dedf4e017d0186f68672f99cc3..74115be27788b687a7fdb80a35bef59f72da5024 100644 (file)
@@ -1827,8 +1827,7 @@ in *Help* buffer.  See also the command `describe-char'."
   (interactive "P")
   (let* ((char (following-char))
          (char-name (and what-cursor-show-names
-                         (or (get-char-code-property char 'name)
-                             (get-char-code-property char 'old-name))))
+                         (char-to-name char)))
          (char-name-fmt (if char-name
                             (format ", %s" char-name)
                           ""))