Function: Buffer-menu-mode
Buffer-menu-mode is a byte-compiled function defined in
buff-menu.el.gz.
Signature
(Buffer-menu-mode)
Documentation
Major mode for Buffer Menu buffers.
The Buffer Menu is invoked by the commands C-x C-b (list-buffers),
M-x buffer-menu (buffer-menu), and M-x buffer-menu-other-window (buffer-menu-other-window).
See buffer-menu for a description of its contents.
In Buffer Menu mode, the following commands are defined:
q (quit-window) Remove the Buffer Menu from the display.
f (Buffer-menu-this-window) Select current line's buffer in place of the buffer menu.
o (Buffer-menu-other-window) Select that buffer in another window,
so the Buffer Menu remains visible in its window.
V (Buffer-menu-view) Select current line's buffer, in view-mode(var)/view-mode(fun).
O (Buffer-menu-view-other-window) Select that buffer in another window, in view-mode(var)/view-mode(fun).
C-o (Buffer-menu-switch-other-window) Make another window display that buffer.
m (Buffer-menu-mark) Mark current line's buffer to be displayed.
v (Buffer-menu-select) Select current line's buffer.
Also show buffers marked with "m", in other windows.
1 (Buffer-menu-1-window) Select that buffer in full-frame window.
2 (Buffer-menu-2-window) Select that buffer in one window, together with the
buffer selected before this one in another window.
M-s a C-s (Buffer-menu-isearch-buffers) Incremental search in the marked buffers.
M-s a C-M-s (Buffer-menu-isearch-buffers-regexp) Isearch for regexp in the marked buffers.
M-s a C-o (Buffer-menu-multi-occur) Show lines matching regexp in the marked buffers.
t (Buffer-menu-visit-tags-table) visit-tags-table this buffer.
~ (Buffer-menu-not-modified) Clear modified-flag on that buffer.
s (Buffer-menu-save) Mark that buffer to be saved, and move down.
d (Buffer-menu-delete) Mark that buffer to be deleted, and move down.
C-d (Buffer-menu-delete-backwards) Mark that buffer to be deleted, and move up.
x (Buffer-menu-execute) Delete or save marked buffers.
u (Buffer-menu-unmark) Remove all marks from current line.
With prefix argument, also move up one line.
M-DEL (Buffer-menu-unmark-all-buffers) Remove a particular mark from all lines.
U (Buffer-menu-unmark-all) Remove all marks from all lines.
DEL (Buffer-menu-backup-unmark) Back up a line and remove marks.
% (Buffer-menu-toggle-read-only) Toggle read-only status of buffer on this line.
g (revert-buffer) Update the list of buffers.
T (Buffer-menu-toggle-files-only) Toggle whether the menu displays only file buffers.
b (Buffer-menu-bury) Bury the buffer listed on this line.
In addition to any hooks its parent mode tabulated-list-mode might
have run, this mode runs the hook Buffer-menu-mode-hook, as the final
or penultimate step during initialization.
Source Code
;; Defined in /usr/src/emacs/lisp/buff-menu.el.gz
(define-derived-mode Buffer-menu-mode tabulated-list-mode "Buffer Menu"
"Major mode for Buffer Menu buffers.
The Buffer Menu is invoked by the commands \\[list-buffers],
\\[buffer-menu], and \\[buffer-menu-other-window].
See `buffer-menu' for a description of its contents.
In Buffer Menu mode, the following commands are defined:
\\<Buffer-menu-mode-map>
\\[quit-window] Remove the Buffer Menu from the display.
\\[Buffer-menu-this-window] Select current line's buffer in place of the buffer menu.
\\[Buffer-menu-other-window] Select that buffer in another window,
so the Buffer Menu remains visible in its window.
\\[Buffer-menu-view] Select current line's buffer, in `view-mode'.
\\[Buffer-menu-view-other-window] Select that buffer in another window, in `view-mode'.
\\[Buffer-menu-switch-other-window] Make another window display that buffer.
\\[Buffer-menu-mark] Mark current line's buffer to be displayed.
\\[Buffer-menu-select] Select current line's buffer.
Also show buffers marked with \"m\", in other windows.
\\[Buffer-menu-1-window] Select that buffer in full-frame window.
\\[Buffer-menu-2-window] Select that buffer in one window, together with the
buffer selected before this one in another window.
\\[Buffer-menu-isearch-buffers] Incremental search in the marked buffers.
\\[Buffer-menu-isearch-buffers-regexp] Isearch for regexp in the marked buffers.
\\[Buffer-menu-multi-occur] Show lines matching regexp in the marked buffers.
\\[Buffer-menu-visit-tags-table] `visit-tags-table' this buffer.
\\[Buffer-menu-not-modified] Clear modified-flag on that buffer.
\\[Buffer-menu-save] Mark that buffer to be saved, and move down.
\\[Buffer-menu-delete] Mark that buffer to be deleted, and move down.
\\[Buffer-menu-delete-backwards] Mark that buffer to be deleted, and move up.
\\[Buffer-menu-execute] Delete or save marked buffers.
\\[Buffer-menu-unmark] Remove all marks from current line.
With prefix argument, also move up one line.
\\[Buffer-menu-unmark-all-buffers] Remove a particular mark from all lines.
\\[Buffer-menu-unmark-all] Remove all marks from all lines.
\\[Buffer-menu-backup-unmark] Back up a line and remove marks.
\\[Buffer-menu-toggle-read-only] Toggle read-only status of buffer on this line.
\\[revert-buffer] Update the list of buffers.
\\[Buffer-menu-toggle-files-only] Toggle whether the menu displays only file buffers.
\\[Buffer-menu-bury] Bury the buffer listed on this line."
:interactive nil
(setq-local buffer-stale-function
(lambda (&optional _noconfirm) 'fast))
(add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t))