diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2016-11-22 15:23:50 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2016-11-22 15:23:50 +0900 |
commit | 27b754cb4432ece3efe3fc9d8e52a869ae061b7f (patch) | |
tree | a0b2c5c7a1747c07c41187723b629280a9e6f05c /lisp/emacs-lisp | |
parent | 3c194dafe080c45528063a20075f8cd53a3760b3 (diff) | |
download | emacs-27b754cb4432ece3efe3fc9d8e52a869ae061b7f.tar.gz |
buff-menu: Add command to unmark all buffers
Bind 'U' in buff-menu, bs and electric-buff-menu to commands
to unmark all buffers (Bug#24880).
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-header-overlay-p):
New predicate; return non-nil if tabulated-list has a fake header.
* lisp/buff-menu.el (Buffer-menu-unmark-all-buffers):
New command; remove all flags that use a particular mark from all the lines.
Bind it to 'M-DEL'.
(Buffer-menu-unmark-all):
New command; remove all flags from all the lines. Bind it to 'U'.
(Buffer-menu-marker-char, Buffer-menu-del-char): New variables.
(Buffer-menu-delete, Buffer-menu-mark): Use them.
(Buffer-menu-mode-map): Update menus.
(Buffer-menu-mode): Update mode doc.
* lisp/bs.el (bs-unmark-all, bs-unmark-previous): New commands.
(bs-mode-map): Bind them to 'U' and '<backspace>' respectively.
(bs-mode): Update mode doc.
* lisp/ebuff-menu.el (electric-buffer-menu-mode-map):
Bind Buffer-menu-unmark-all to 'U' and Buffer-menu-unmark-all-buffers
to 'M-DEL'.
(bs--down, bs-down, bs--up, bs-up, bs-unmark-current, bs-mark-current):
Use point instead of cursor in doc string.
(electric-buffer-list): Update mode doc.
* doc/emacs/buffers.texi (Several Buffers): Mention Buffer-menu-unmark-all
and Buffer-menu-unmark-all-buffers.
; * etc/NEWS: Add an entry per each new feature.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index cf297f1ef4a..9523d5e89e3 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -259,6 +259,12 @@ Do nothing if `tabulated-list--header-string' is nil." (make-overlay (point-min) (point)))) (overlay-put tabulated-list--header-overlay 'face 'underline)))) +(defsubst tabulated-list-header-overlay-p (&optional pos) + "Return non-nil if there is a fake header. +Optional arg POS is a buffer position where to look for a fake header; +defaults to `point-min'." + (overlays-at (or pos (point-min)))) + (defun tabulated-list-revert (&rest ignored) "The `revert-buffer-function' for `tabulated-list-mode'. It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'." |