diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-04-18 19:21:31 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-04-18 19:21:31 -0400 |
commit | 16a43933e891bae502efbe367e32608fcfffdec3 (patch) | |
tree | ddb3c0de0625e8d5880828006d9b66aae9ec97d2 /lisp/emacs-lisp | |
parent | 8d6d9c8f8de3841257c0b74448a824583bbf2c01 (diff) | |
download | emacs-16a43933e891bae502efbe367e32608fcfffdec3.tar.gz emacs-16a43933e891bae502efbe367e32608fcfffdec3.tar.bz2 emacs-16a43933e891bae502efbe367e32608fcfffdec3.zip |
Allow glyphless-char-display to distinguish between X and text terminals.
Use this for Tabulated List mode.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Use a custom
glyphless-char-display table.
(tabulated-list-glyphless-char-display): New var.
* src/term.c (produce_glyphless_glyph): Handle cons cell entry in
glyphless-char-display.
* src/xdisp.c (lookup_glyphless_char_display)
(produce_glyphless_glyph): Handle cons cell entry in
glyphless-char-display.
(Vglyphless_char_display): Document it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 6409c2206bc..2fdfa9525b1 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -143,6 +143,15 @@ If ADVANCE is non-nil, move forward by one line afterwards." map) "Local keymap for `tabulated-list-mode' sort buttons.") +(defvar tabulated-list-glyphless-char-display + (let ((table (make-char-table 'glyphless-char-display nil))) + (set-char-table-parent table glyphless-char-display) + ;; Some text terminals can't display the unicode arrows; be safe. + (aset table 9650 (cons nil "^")) + (aset table 9660 (cons nil "v")) + table) + "The `glyphless-char-display' table in Tabulated List buffers.") + (defun tabulated-list-init-header () "Set up header line for the Tabulated List buffer." (let ((x tabulated-list-padding) @@ -341,7 +350,9 @@ as the ewoc pretty-printer." (setq truncate-lines t) (setq buffer-read-only t) (set (make-local-variable 'revert-buffer-function) - 'tabulated-list-revert)) + 'tabulated-list-revert) + (set (make-local-variable 'glyphless-char-display) + tabulated-list-glyphless-char-display)) (put 'tabulated-list-mode 'mode-class 'special) |