Mercurial > emacs
comparison lisp/buff-menu.el @ 25166:e8ec0085ff7b
(Buffer-menu-mode-map): Add V for Buffer-menu-View.
(Buffer-menu-mode): Doc fix.
(Buffer-menu-view): New command.
(Buffer-menu-view-other-window): New command.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 03 Aug 1999 17:38:59 +0000 |
parents | aa96b119d0ef |
children | e3f8778af2f7 |
comparison
equal
deleted
inserted
replaced
25165:8b9110694bfa | 25166:e8ec0085ff7b |
---|---|
28 ;; any special or scratch buffers you have loaded, since you can't find | 28 ;; any special or scratch buffers you have loaded, since you can't find |
29 ;; them by filename. The single entry point is `Buffer-menu-mode', | 29 ;; them by filename. The single entry point is `Buffer-menu-mode', |
30 ;; normally bound to C-x C-b. | 30 ;; normally bound to C-x C-b. |
31 | 31 |
32 ;;; Change Log: | 32 ;;; Change Log: |
33 | |
34 ;; Buffer-menu-view: New function | |
35 ;; Buffer-menu-view-other-window: New function | |
33 | 36 |
34 ;; Merged by esr with recent mods to Emacs 19 buff-menu, 23 Mar 1993 | 37 ;; Merged by esr with recent mods to Emacs 19 buff-menu, 23 Mar 1993 |
35 ;; | 38 ;; |
36 ;; Modified by Bob Weiner, Motorola, Inc., 4/14/89 | 39 ;; Modified by Bob Weiner, Motorola, Inc., 4/14/89 |
37 ;; | 40 ;; |
92 (define-key Buffer-menu-mode-map "m" 'Buffer-menu-mark) | 95 (define-key Buffer-menu-mode-map "m" 'Buffer-menu-mark) |
93 (define-key Buffer-menu-mode-map "t" 'Buffer-menu-visit-tags-table) | 96 (define-key Buffer-menu-mode-map "t" 'Buffer-menu-visit-tags-table) |
94 (define-key Buffer-menu-mode-map "%" 'Buffer-menu-toggle-read-only) | 97 (define-key Buffer-menu-mode-map "%" 'Buffer-menu-toggle-read-only) |
95 (define-key Buffer-menu-mode-map "b" 'Buffer-menu-bury) | 98 (define-key Buffer-menu-mode-map "b" 'Buffer-menu-bury) |
96 (define-key Buffer-menu-mode-map "g" 'Buffer-menu-revert) | 99 (define-key Buffer-menu-mode-map "g" 'Buffer-menu-revert) |
100 (define-key Buffer-menu-mode-map "V" 'Buffer-menu-view) | |
97 (define-key Buffer-menu-mode-map [mouse-2] 'Buffer-menu-mouse-select) | 101 (define-key Buffer-menu-mode-map [mouse-2] 'Buffer-menu-mouse-select) |
98 ) | 102 ) |
99 | 103 |
100 ;; Buffer Menu mode is suitable only for specially formatted data. | 104 ;; Buffer Menu mode is suitable only for specially formatted data. |
101 (put 'Buffer-menu-mode 'mode-class 'special) | 105 (put 'Buffer-menu-mode 'mode-class 'special) |
107 \\<Buffer-menu-mode-map> | 111 \\<Buffer-menu-mode-map> |
108 \\[Buffer-menu-mouse-select] -- select buffer you click on, in place of the buffer menu. | 112 \\[Buffer-menu-mouse-select] -- select buffer you click on, in place of the buffer menu. |
109 \\[Buffer-menu-this-window] -- select current line's buffer in place of the buffer menu. | 113 \\[Buffer-menu-this-window] -- select current line's buffer in place of the buffer menu. |
110 \\[Buffer-menu-other-window] -- select that buffer in another window, | 114 \\[Buffer-menu-other-window] -- select that buffer in another window, |
111 so the buffer menu buffer remains visible in its window. | 115 so the buffer menu buffer remains visible in its window. |
116 \\[Buffer-menu-view] -- select current line's buffer, but in view-mode. | |
117 \\[Buffer-menu-view-other-window] -- select that buffer in | |
118 another window, in view-mode. | |
112 \\[Buffer-menu-switch-other-window] -- make another window display that buffer. | 119 \\[Buffer-menu-switch-other-window] -- make another window display that buffer. |
113 \\[Buffer-menu-mark] -- mark current line's buffer to be displayed. | 120 \\[Buffer-menu-mark] -- mark current line's buffer to be displayed. |
114 \\[Buffer-menu-select] -- select current line's buffer. | 121 \\[Buffer-menu-select] -- select current line's buffer. |
115 Also show buffers marked with m, in other windows. | 122 Also show buffers marked with m, in other windows. |
116 \\[Buffer-menu-1-window] -- select that buffer in full-frame window. | 123 \\[Buffer-menu-1-window] -- select that buffer in full-frame window. |
433 (buffer-read-only nil)) | 440 (buffer-read-only nil)) |
434 (delete-region (point) (progn (forward-line -1) (point))) | 441 (delete-region (point) (progn (forward-line -1) (point))) |
435 (goto-char (point-max)) | 442 (goto-char (point-max)) |
436 (insert line)) | 443 (insert line)) |
437 (message "Buried buffer moved to the end")))) | 444 (message "Buried buffer moved to the end")))) |
445 | |
446 | |
447 (defun Buffer-menu-view () | |
448 "View this line's buffer in View mode." | |
449 (interactive) | |
450 (view-buffer (Buffer-menu-buffer t))) | |
451 | |
452 | |
453 (defun Buffer-menu-view-other-window () | |
454 "View this line's buffer in View mode in another window." | |
455 (interactive) | |
456 (view-buffer-other-window (Buffer-menu-buffer t))) | |
438 | 457 |
439 | 458 |
440 (define-key ctl-x-map "\C-b" 'list-buffers) | 459 (define-key ctl-x-map "\C-b" 'list-buffers) |
441 | 460 |
442 (defun list-buffers (&optional files-only) | 461 (defun list-buffers (&optional files-only) |