diff options
| author | Kenichi Handa | 2008-10-27 02:12:03 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-10-27 02:12:03 +0000 |
| commit | a62ac7e3fd6cb81786c06317f453758d0e0956d4 (patch) | |
| tree | 9d99419df92b31f6186274506494ca6ee111d450 | |
| parent | 24eccbe29aedd6a1ce13ffc7888afb2065976b32 (diff) | |
| download | emacs-a62ac7e3fd6cb81786c06317f453758d0e0956d4.tar.gz emacs-a62ac7e3fd6cb81786c06317f453758d0e0956d4.zip | |
(describe-char): Fix terminal case (where font is nil).
| -rw-r--r-- | lisp/descr-text.el | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index e585f644cdf..689e4d3df6a 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -606,15 +606,23 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 606 | (nglyphs (lgstring-glyph-len gstring)) | 606 | (nglyphs (lgstring-glyph-len gstring)) |
| 607 | (i 0) | 607 | (i 0) |
| 608 | glyph) | 608 | glyph) |
| 609 | (insert " using this font:\n " | 609 | (if font |
| 610 | (symbol-name (font-get font :type)) | 610 | (progn |
| 611 | ?: | 611 | (insert " using this font:\n " |
| 612 | (aref (query-font font) 0) | 612 | (symbol-name (font-get font :type)) |
| 613 | "\nby these glyphs:\n") | 613 | ?: |
| 614 | (while (and (< i nglyphs) | 614 | (aref (query-font font) 0) |
| 615 | (setq glyph (lgstring-glyph gstring i))) | 615 | "\nby these glyphs:\n") |
| 616 | (insert (format " %S\n" glyph)) | 616 | (while (and (< i nglyphs) |
| 617 | (setq i (1+ i)))) | 617 | (setq glyph (lgstring-glyph gstring i))) |
| 618 | (insert (format " %S\n" glyph)) | ||
| 619 | (setq i (1+ i)))) | ||
| 620 | (insert " by these characters:\n") | ||
| 621 | (while (and (< i nglyphs) | ||
| 622 | (setq glyph (lgstring-glyph gstring i))) | ||
| 623 | (insert (format " %c (#x%d)\n" | ||
| 624 | (lglyph-char glyph) (lglyph-char glyph))) | ||
| 625 | (setq i (1+ i))))) | ||
| 618 | (insert " by the rule:\n\t(") | 626 | (insert " by the rule:\n\t(") |
| 619 | (let ((first t)) | 627 | (let ((first t)) |
| 620 | (mapc (lambda (x) | 628 | (mapc (lambda (x) |