aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Pluim2024-06-07 12:07:50 +0200
committerRobert Pluim2024-06-11 11:06:37 +0200
commite4b243b931be8c2f605ce2bb6dbcda4edad7400f (patch)
tree6f3a9075dfec6e0585922c8d63801acdecb55e6f
parent3a4cf1aa1efb79b52c0aca18281593ba0e8175ca (diff)
downloademacs-e4b243b931be8c2f605ce2bb6dbcda4edad7400f.tar.gz
emacs-e4b243b931be8c2f605ce2bb6dbcda4edad7400f.zip
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.
-rw-r--r--lisp/international/emoji.el2
-rw-r--r--lisp/international/textsec.el2
-rw-r--r--lisp/simple.el3
3 files changed, 3 insertions, 4 deletions
diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el
index 4f3aab5a6be..cbf7c547f4c 100644
--- a/lisp/international/emoji.el
+++ b/lisp/international/emoji.el
@@ -245,7 +245,7 @@ the name is not known."
245 245
246(defun emoji--name (glyph) 246(defun emoji--name (glyph)
247 (or (gethash glyph emoji--names) 247 (or (gethash glyph emoji--names)
248 (get-char-code-property (aref glyph 0) 'name))) 248 (char-to-name (aref glyph 0))))
249 249
250(defvar-keymap emoji-list-mode-map 250(defvar-keymap emoji-list-mode-map
251 "RET" #'emoji-list-select 251 "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."
296 "" 296 ""
297 (concat ": " (string char))) 297 (concat ": " (string char)))
298 char 298 char
299 (get-char-code-property char 'name))))) 299 (char-to-name char)))))
300 domain) 300 domain)
301 ;; Does IDNA allow it? 301 ;; Does IDNA allow it?
302 (unless (puny-highly-restrictive-domain-p domain) 302 (unless (puny-highly-restrictive-domain-p domain)
diff --git a/lisp/simple.el b/lisp/simple.el
index 171ef96351f..74115be2778 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1827,8 +1827,7 @@ in *Help* buffer. See also the command `describe-char'."
1827 (interactive "P") 1827 (interactive "P")
1828 (let* ((char (following-char)) 1828 (let* ((char (following-char))
1829 (char-name (and what-cursor-show-names 1829 (char-name (and what-cursor-show-names
1830 (or (get-char-code-property char 'name) 1830 (char-to-name char)))
1831 (get-char-code-property char 'old-name))))
1832 (char-name-fmt (if char-name 1831 (char-name-fmt (if char-name
1833 (format ", %s" char-name) 1832 (format ", %s" char-name)
1834 "")) 1833 ""))