diff options
| author | Richard M. Stallman | 1997-06-17 19:32:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-17 19:32:04 +0000 |
| commit | a59faabe2ba6554a883ac3ae12d1e0c80fefe9a4 (patch) | |
| tree | f9013b744ed25f114fe0cce419cfc2d6247454a1 | |
| parent | c361280d2cf113f957d42044fd6c5be93b14f5ec (diff) | |
| download | emacs-a59faabe2ba6554a883ac3ae12d1e0c80fefe9a4.tar.gz emacs-a59faabe2ba6554a883ac3ae12d1e0c80fefe9a4.zip | |
(Buffer-menu-mode): Doc fix.
(Buffer-menu-bury): Move the line to the end.
| -rw-r--r-- | lisp/buff-menu.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index e231011e17d..b03ccdb4eb4 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -125,7 +125,8 @@ Letters do not insert themselves; instead, they are commands. | |||
| 125 | With prefix argument, also move up one line. | 125 | With prefix argument, also move up one line. |
| 126 | \\[Buffer-menu-backup-unmark] -- back up a line and remove marks. | 126 | \\[Buffer-menu-backup-unmark] -- back up a line and remove marks. |
| 127 | \\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line. | 127 | \\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line. |
| 128 | \\[Buffer-menu-revert] -- update the list of buffers." | 128 | \\[Buffer-menu-revert] -- update the list of buffers. |
| 129 | \\[Buffer-menu-bury] -- bury the buffer listed on this line." | ||
| 129 | (kill-all-local-variables) | 130 | (kill-all-local-variables) |
| 130 | (use-local-map Buffer-menu-mode-map) | 131 | (use-local-map Buffer-menu-mode-map) |
| 131 | (setq major-mode 'Buffer-menu-mode) | 132 | (setq major-mode 'Buffer-menu-mode) |
| @@ -429,7 +430,18 @@ The current window remains selected." | |||
| 429 | (defun Buffer-menu-bury () | 430 | (defun Buffer-menu-bury () |
| 430 | "Bury the buffer listed on this line." | 431 | "Bury the buffer listed on this line." |
| 431 | (interactive) | 432 | (interactive) |
| 432 | (bury-buffer (Buffer-menu-buffer t))) | 433 | (beginning-of-line) |
| 434 | (if (looking-at " [-M]") ;header lines | ||
| 435 | (ding) | ||
| 436 | (save-excursion | ||
| 437 | (beginning-of-line) | ||
| 438 | (bury-buffer (Buffer-menu-buffer t)) | ||
| 439 | (let ((line (buffer-substring (point) (progn (forward-line 1) (point)))) | ||
| 440 | (buffer-read-only nil)) | ||
| 441 | (delete-region (point) (progn (forward-line -1) (point))) | ||
| 442 | (goto-char (point-max)) | ||
| 443 | (insert line)) | ||
| 444 | (message "Buried buffer moved to the end")))) | ||
| 433 | 445 | ||
| 434 | 446 | ||
| 435 | (define-key ctl-x-map "\C-b" 'list-buffers) | 447 | (define-key ctl-x-map "\C-b" 'list-buffers) |