From: Paul Eggert Date: Wed, 2 Sep 2015 21:43:03 +0000 (-0700) Subject: Fix describe-char bug with glyphs on terminals X-Git-Tag: emacs-25.0.90~1225^2~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b28ad0e9f74646b1126af096a41af20d3e01ad68;p=emacs.git Fix describe-char bug with glyphs on terminals * lisp/descr-text.el (describe-char): Terminals can have glyphs in buffers too, so don’t treat them differently from graphic displays. Without this fix, describe-char would throw an error on a terminal if given a glyph with a non-default face. --- diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 237cc00a36f..f81b08477bb 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -724,25 +724,17 @@ relevant to POS." (when disp-vector (insert "\nThe display table entry is displayed by ") - (if (display-graphic-p (selected-frame)) - (progn - (insert "these fonts (glyph codes):\n") - (dotimes (i (length disp-vector)) - (insert (glyph-char (car (aref disp-vector i))) ?: - (propertize " " 'display '(space :align-to 5)) - (or (cdr (aref disp-vector i)) "-- no font --") - "\n") - (let ((face (glyph-face (car (aref disp-vector i))))) - (when face - (insert (propertize " " 'display '(space :align-to 5)) - "face: ") - (insert (format-message "‘%s’\n" face)))))) - (insert "these terminal codes:\n") - (dotimes (i (length disp-vector)) - (insert (car (aref disp-vector i)) - (propertize " " 'display '(space :align-to 5)) - (or (cdr (aref disp-vector i)) "-- not encodable --") - "\n")))) + (insert "these fonts (glyph codes):\n") + (dotimes (i (length disp-vector)) + (insert (glyph-char (car (aref disp-vector i))) ?: + (propertize " " 'display '(space :align-to 5)) + (or (cdr (aref disp-vector i)) "-- no font --") + "\n") + (let ((face (glyph-face (car (aref disp-vector i))))) + (when face + (insert (propertize " " 'display '(space :align-to 5)) + "face: ") + (insert (format-message "‘%s’\n" face)))))) (when composition (insert "\nComposed")