summaryrefslogtreecommitdiff
path: root/lisp/descr-text.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-07-15 23:13:59 +0200
committerAndrea Corallo <akrl@sdf.org>2020-07-15 23:13:59 +0200
commit907618b3b51a653d111d7f5764da586fcee6da5e (patch)
treeddde8eb9f40da415fc7699d16948eb9638804588 /lisp/descr-text.el
parent2c2cc21f1be721e5ba30fa22aedeb5c254791193 (diff)
parent85eaa8373bb0a91013af503d333670788ec5a956 (diff)
downloademacs-907618b3b51a653d111d7f5764da586fcee6da5e.tar.gz
emacs-907618b3b51a653d111d7f5764da586fcee6da5e.tar.bz2
emacs-907618b3b51a653d111d7f5764da586fcee6da5e.zip
Merge remote-tracking branch 'savahnna/master' into HEAD
Diffstat (limited to 'lisp/descr-text.el')
-rw-r--r--lisp/descr-text.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 4de1a7b7005..be5e01435a7 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -775,13 +775,16 @@ The character information includes:
(setq glyph (lgstring-glyph gstring from)))
(insert (format " %S\n" glyph))
(setq from (1+ from)))
- (insert "from these character(s):\n")
- (dotimes (i (lgstring-char-len gstring))
- (let ((char (lgstring-char gstring i)))
- (insert (format " %c (#x%x) %s\n"
- char char
- (get-char-code-property
- char 'name))))))
+ (when (and (stringp (car composition))
+ (string-match "\"\\([^\"]+\\)\"" (car composition)))
+ (insert "with these character(s):\n")
+ (let ((chars (match-string 1 (car composition))))
+ (dotimes (i (length chars))
+ (let ((char (aref chars i)))
+ (insert (format " %c (#x%x) %s\n"
+ char char
+ (get-char-code-property
+ char 'name))))))))
;; TTY frame: show composition in terms of characters.
(insert " by these characters:\n")
(while (and (<= from to)
@@ -950,7 +953,7 @@ This function can be used as a value of
;; instead of returning a string tailored here for the echo area
;; exclusively, we could call the (now unused) argument
;; _CALLBACK with hints on how to shorten the string if needed,
- ;; or with multiple usable strings which Eldoc picks according
+ ;; or with multiple usable strings which ElDoc picks according
;; to its space contraints.
(describe-char-eldoc--format
ch