diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-09-02 14:43:03 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-09-02 14:45:22 -0700 |
commit | b28ad0e9f74646b1126af096a41af20d3e01ad68 (patch) | |
tree | eeefffb711735886ab3ee23efe5333aa53c48e72 /lisp/descr-text.el | |
parent | a9706c6cc16baeaf49b1dfc4badc0254870c449d (diff) | |
download | emacs-b28ad0e9f74646b1126af096a41af20d3e01ad68.tar.gz |
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.
Diffstat (limited to 'lisp/descr-text.el')
-rw-r--r-- | lisp/descr-text.el | 30 |
1 files changed, 11 insertions, 19 deletions
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") |