Mercurial > emacs
changeset 99151:524569e0f990
(describe-char): Fix terminal case (where font is nil).
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 27 Oct 2008 02:12:03 +0000 |
parents | cdad15e238e0 |
children | 162fccf6d2c3 |
files | lisp/descr-text.el |
diffstat | 1 files changed, 17 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/descr-text.el Mon Oct 27 02:05:42 2008 +0000 +++ b/lisp/descr-text.el Mon Oct 27 02:12:03 2008 +0000 @@ -606,15 +606,23 @@ (nglyphs (lgstring-glyph-len gstring)) (i 0) glyph) - (insert " using this font:\n " - (symbol-name (font-get font :type)) - ?: - (aref (query-font font) 0) - "\nby these glyphs:\n") - (while (and (< i nglyphs) - (setq glyph (lgstring-glyph gstring i))) - (insert (format " %S\n" glyph)) - (setq i (1+ i)))) + (if font + (progn + (insert " using this font:\n " + (symbol-name (font-get font :type)) + ?: + (aref (query-font font) 0) + "\nby these glyphs:\n") + (while (and (< i nglyphs) + (setq glyph (lgstring-glyph gstring i))) + (insert (format " %S\n" glyph)) + (setq i (1+ i)))) + (insert " by these characters:\n") + (while (and (< i nglyphs) + (setq glyph (lgstring-glyph gstring i))) + (insert (format " %c (#x%d)\n" + (lglyph-char glyph) (lglyph-char glyph))) + (setq i (1+ i))))) (insert " by the rule:\n\t(") (let ((first t)) (mapc (lambda (x)