aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2011-04-18 19:21:31 -0400
committerChong Yidong2011-04-18 19:21:31 -0400
commit16a43933e891bae502efbe367e32608fcfffdec3 (patch)
treeddb3c0de0625e8d5880828006d9b66aae9ec97d2 /lisp
parent8d6d9c8f8de3841257c0b74448a824583bbf2c01 (diff)
downloademacs-16a43933e891bae502efbe367e32608fcfffdec3.tar.gz
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')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/tabulated-list.el13
2 files changed, 18 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 373ae63bfe5..2e024d34981 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-04-18 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs-lisp/tabulated-list.el (tabulated-list-mode): Use a custom
4 glyphless-char-display table.
5 (tabulated-list-glyphless-char-display): New var.
6
12011-04-18 Sam Steingold <sds@gnu.org> 72011-04-18 Sam Steingold <sds@gnu.org>
2 8
3 * vc/add-log.el (change-log-font-lock-keywords): Add "Thanks to" 9 * vc/add-log.el (change-log-font-lock-keywords): Add "Thanks to"
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."
143 map) 143 map)
144 "Local keymap for `tabulated-list-mode' sort buttons.") 144 "Local keymap for `tabulated-list-mode' sort buttons.")
145 145
146(defvar tabulated-list-glyphless-char-display
147 (let ((table (make-char-table 'glyphless-char-display nil)))
148 (set-char-table-parent table glyphless-char-display)
149 ;; Some text terminals can't display the unicode arrows; be safe.
150 (aset table 9650 (cons nil "^"))
151 (aset table 9660 (cons nil "v"))
152 table)
153 "The `glyphless-char-display' table in Tabulated List buffers.")
154
146(defun tabulated-list-init-header () 155(defun tabulated-list-init-header ()
147 "Set up header line for the Tabulated List buffer." 156 "Set up header line for the Tabulated List buffer."
148 (let ((x tabulated-list-padding) 157 (let ((x tabulated-list-padding)
@@ -341,7 +350,9 @@ as the ewoc pretty-printer."
341 (setq truncate-lines t) 350 (setq truncate-lines t)
342 (setq buffer-read-only t) 351 (setq buffer-read-only t)
343 (set (make-local-variable 'revert-buffer-function) 352 (set (make-local-variable 'revert-buffer-function)
344 'tabulated-list-revert)) 353 'tabulated-list-revert)
354 (set (make-local-variable 'glyphless-char-display)
355 tabulated-list-glyphless-char-display))
345 356
346(put 'tabulated-list-mode 'mode-class 'special) 357(put 'tabulated-list-mode 'mode-class 'special)
347 358