From 89a74d62e4bd047e31fc0ea3a1d5f10b6b93202f Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 7 Jun 2024 12:07:50 +0200 Subject: [PATCH] Use 'char-to-name' * 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 | 2 +- lisp/international/textsec.el | 2 +- lisp/simple.el | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el index cab1d2e663c..bd07c12778a 100644 --- a/lisp/international/emoji.el +++ b/lisp/international/emoji.el @@ -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 diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el index 4740dd81345..224363732fe 100644 --- a/lisp/international/textsec.el +++ b/lisp/international/textsec.el @@ -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) diff --git a/lisp/simple.el b/lisp/simple.el index 667ee74d558..36b99983b5b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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) "")) -- 2.39.2