comparison lisp/descr-text.el @ 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 672009e514b4
children a5a1e57fb667
comparison
equal deleted inserted replaced
99150:cdad15e238e0 99151:524569e0f990
604 (let* ((gstring (nth 2 composition)) 604 (let* ((gstring (nth 2 composition))
605 (font (lgstring-font gstring)) 605 (font (lgstring-font gstring))
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)
621 (if first (setq first nil) 629 (if first (setq first nil)
622 (insert " ")) 630 (insert " "))