# HG changeset patch # User Kenichi Handa # Date 1225073523 0 # Node ID 524569e0f99026436cc237972d0675522ab1171f # Parent cdad15e238e03a5d752106c8a497b5b4e23d2fb5 (describe-char): Fix terminal case (where font is nil). diff -r cdad15e238e0 -r 524569e0f990 lisp/descr-text.el --- 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)