]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'char-to-name'
authorRobert Pluim <rpluim@gmail.com>
Fri, 7 Jun 2024 10:07:50 +0000 (12:07 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Jun 2024 09:28:30 +0000 (11:28 +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.

(cherry picked from commit e4b243b931be8c2f605ce2bb6dbcda4edad7400f)

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

index cab1d2e663ca98746302243ded83c9d9395e5b42..bd07c12778aa60f5bbda93452e4e229e1ccb0c95 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 667ee74d558becabdfb794f9bcac580e3fd57eb7..36b99983b5b3b19af177ca28d5812eea288aad4e 100644 (file)
@@ -1839,8 +1839,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)
                           ""))