Mercurial > emacs
changeset 18280:f693db11df45
(Buffer-menu-mode): Doc fix.
(Buffer-menu-bury): Move the line to the end.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 17 Jun 1997 19:32:04 +0000 |
parents | a9c40a80c9b1 |
children | ffc2fda197bc |
files | lisp/buff-menu.el |
diffstat | 1 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/buff-menu.el Tue Jun 17 05:10:06 1997 +0000 +++ b/lisp/buff-menu.el Tue Jun 17 19:32:04 1997 +0000 @@ -125,7 +125,8 @@ With prefix argument, also move up one line. \\[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. -\\[Buffer-menu-revert] -- update the list of buffers." +\\[Buffer-menu-revert] -- update the list of buffers. +\\[Buffer-menu-bury] -- bury the buffer listed on this line." (kill-all-local-variables) (use-local-map Buffer-menu-mode-map) (setq major-mode 'Buffer-menu-mode) @@ -429,7 +430,18 @@ (defun Buffer-menu-bury () "Bury the buffer listed on this line." (interactive) - (bury-buffer (Buffer-menu-buffer t))) + (beginning-of-line) + (if (looking-at " [-M]") ;header lines + (ding) + (save-excursion + (beginning-of-line) + (bury-buffer (Buffer-menu-buffer t)) + (let ((line (buffer-substring (point) (progn (forward-line 1) (point)))) + (buffer-read-only nil)) + (delete-region (point) (progn (forward-line -1) (point))) + (goto-char (point-max)) + (insert line)) + (message "Buried buffer moved to the end")))) (define-key ctl-x-map "\C-b" 'list-buffers)