# HG changeset patch # User Richard M. Stallman # Date 866575924 0 # Node ID f693db11df4586228a37776d4b20671ed5aef538 # Parent a9c40a80c9b12849954cb73df1926bc394d39e45 (Buffer-menu-mode): Doc fix. (Buffer-menu-bury): Move the line to the end. diff -r a9c40a80c9b1 -r f693db11df45 lisp/buff-menu.el --- 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)