summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
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 @@
+2011-04-18 Chong Yidong <cyd@stupidchicken.com>
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-mode): Use a custom
+ glyphless-char-display table.
+ (tabulated-list-glyphless-char-display): New var.
+
2011-04-18 Sam Steingold <sds@gnu.org>
* 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."
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)