summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-05-13 22:23:45 +0800
committerChong Yidong <cyd@gnu.org>2012-05-13 22:23:45 +0800
commit0ae03b6aae534c1a47f7246e791138b41203b036 (patch)
tree5ef68daa68dc715d0aa2964a42838808e0d17fcf /lisp/emacs-lisp
parentc3b16428ea14151a64b1155ef304df15f23c8125 (diff)
downloademacs-0ae03b6aae534c1a47f7246e791138b41203b036.tar.gz
emacs-0ae03b6aae534c1a47f7246e791138b41203b036.tar.bz2
emacs-0ae03b6aae534c1a47f7246e791138b41203b036.zip
Adapt Electric Buffer Menu to recent Buffer Menu changes.
* lisp/ebuff-menu.el (electric-buffer-list): Put electric buffer menu command descriptions in this docstring, instead of the docstring of electric-buffer-menu-mode. Code cleanups. (electric-buffer-menu-mode): Use define-derived-mode. Rename from Electric-buffer-menu-mode. (electric-buffer-update-highlight): Minor code cleanup. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-format) (tabulated-list-entries, tabulated-list-padding) (tabulated-list-sort-key): Make permanent-local. Fixes: debbugs:11455
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/tabulated-list.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index e56fea58553..a56a7619ea9 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -35,6 +35,11 @@
;;; Code:
+;; The reason `tabulated-list-format' and other variables are
+;; permanent-local is to make it convenient to switch to a different
+;; major mode, switch back, and have the original Tabulated List data
+;; still valid. See, for example, ebuff-menu.el.
+
(defvar tabulated-list-format nil
"The format of the current Tabulated List mode buffer.
This should be a vector of elements (NAME WIDTH SORT . PROPS),
@@ -56,6 +61,7 @@ where:
- `:pad-right': Number of additional padding spaces to the
right of the column (defaults to 1 if omitted).")
(make-variable-buffer-local 'tabulated-list-format)
+(put 'tabulated-list-format 'permanent-local t)
(defvar tabulated-list-use-header-line t
"Whether the Tabulated List buffer should use a header line.")
@@ -80,12 +86,14 @@ where:
If `tabulated-list-entries' is a function, it is called with no
arguments and must return a list of the above form.")
(make-variable-buffer-local 'tabulated-list-entries)
+(put 'tabulated-list-entries 'permanent-local t)
(defvar tabulated-list-padding 0
"Number of characters preceding each Tabulated List mode entry.
By default, lines are padded with spaces, but you can use the
function `tabulated-list-put-tag' to change this.")
(make-variable-buffer-local 'tabulated-list-padding)
+(put 'tabulated-list-padding 'permanent-local t)
(defvar tabulated-list-revert-hook nil
"Hook run before reverting a Tabulated List buffer.
@@ -107,6 +115,7 @@ NAME is a string matching one of the column names in
`tabulated-list-format' then specifies how to sort). FLIP, if
non-nil, means to invert the resulting sort.")
(make-variable-buffer-local 'tabulated-list-sort-key)
+(put 'tabulated-list-sort-key 'permanent-local t)
(defsubst tabulated-list-get-id (&optional pos)
"Return the entry ID of the Tabulated List entry at POS.