diff options
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 94b3c1553e5..5660ac8c4cc 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -4,6 +4,7 @@ ;; Author: Chong Yidong <cyd@stupidchicken.com> ;; Keywords: extensions, lisp +;; Version: 1.0 ;; This file is part of GNU Emacs. @@ -379,7 +380,9 @@ Return the column number after insertion." (setq width (- width shift)) (setq x (+ x shift)))) (if (stringp col-desc) - (insert (propertize label 'help-echo help-echo)) + (insert (if (get-text-property 0 'help-echo label) + label + (propertize label 'help-echo help-echo))) (apply 'insert-text-button label (cdr col-desc))) (let ((next-x (+ x pad-right width))) ;; No need to append any spaces if this is the last column. @@ -517,12 +520,11 @@ printer is `tabulated-list-print-entry', but a mode that keeps data in an ewoc may instead specify a printer function (e.g., one that calls `ewoc-enter-last'), with `tabulated-list-print-entry' as the ewoc pretty-printer." - (setq truncate-lines t) - (setq buffer-read-only t) - (set (make-local-variable 'revert-buffer-function) - 'tabulated-list-revert) - (set (make-local-variable 'glyphless-char-display) - tabulated-list-glyphless-char-display)) + (setq-local truncate-lines t) + (setq-local buffer-read-only t) + (setq-local buffer-undo-list t) + (setq-local revert-buffer-function #'tabulated-list-revert) + (setq-local glyphless-char-display tabulated-list-glyphless-char-display)) (put 'tabulated-list-mode 'mode-class 'special) |