aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/buff-menu.el12
-rw-r--r--lisp/files.el1
-rw-r--r--src/window.c3
3 files changed, 13 insertions, 3 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 371bb586d80..6682f42c682 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -1,12 +1,12 @@
1;;; buff-menu.el --- buffer menu main function and support functions. 1;;; buff-menu.el --- buffer menu main function and support functions.
2 2
3;; Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
4 4
5;; This file is part of GNU Emacs. 5;; This file is part of GNU Emacs.
6 6
7;; GNU Emacs is free software; you can redistribute it and/or modify 7;; GNU Emacs is free software; you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by 8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation; either version 1, or (at your option) 9;; the Free Software Foundation; either version 2, or (at your option)
10;; any later version. 10;; any later version.
11 11
12;; GNU Emacs is distributed in the hope that it will be useful, 12;; GNU Emacs is distributed in the hope that it will be useful,
@@ -33,6 +33,7 @@
33 (define-key Buffer-menu-mode-map "1" 'Buffer-menu-1-window) 33 (define-key Buffer-menu-mode-map "1" 'Buffer-menu-1-window)
34 (define-key Buffer-menu-mode-map "f" 'Buffer-menu-this-window) 34 (define-key Buffer-menu-mode-map "f" 'Buffer-menu-this-window)
35 (define-key Buffer-menu-mode-map "o" 'Buffer-menu-other-window) 35 (define-key Buffer-menu-mode-map "o" 'Buffer-menu-other-window)
36 (define-key Buffer-menu-mode-map "\C-o" 'Buffer-menu-switch-other-window)
36 (define-key Buffer-menu-mode-map "s" 'Buffer-menu-save) 37 (define-key Buffer-menu-mode-map "s" 'Buffer-menu-save)
37 (define-key Buffer-menu-mode-map "d" 'Buffer-menu-delete) 38 (define-key Buffer-menu-mode-map "d" 'Buffer-menu-delete)
38 (define-key Buffer-menu-mode-map "k" 'Buffer-menu-delete) 39 (define-key Buffer-menu-mode-map "k" 'Buffer-menu-delete)
@@ -66,6 +67,7 @@ Letters do not insert themselves; instead, they are commands.
66\\[Buffer-menu-this-window] -- select that buffer in place of the buffer menu buffer. 67\\[Buffer-menu-this-window] -- select that buffer in place of the buffer menu buffer.
67\\[Buffer-menu-other-window] -- select that buffer in another window, 68\\[Buffer-menu-other-window] -- select that buffer in another window,
68 so the buffer menu buffer remains visible in its window. 69 so the buffer menu buffer remains visible in its window.
70\\[Buffer-menu-switch-other-window] -- switch the other window to this buffer.
69\\[Buffer-menu-visit-tags-table] -- visit-tags-table this buffer. 71\\[Buffer-menu-visit-tags-table] -- visit-tags-table this buffer.
70\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer. 72\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer.
71\\[Buffer-menu-save] -- mark that buffer to be saved, and move down. 73\\[Buffer-menu-save] -- mark that buffer to be saved, and move down.
@@ -274,6 +276,12 @@ You can mark buffers with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] comma
274 (interactive) 276 (interactive)
275 (switch-to-buffer-other-window (Buffer-menu-buffer t))) 277 (switch-to-buffer-other-window (Buffer-menu-buffer t)))
276 278
279(defun Buffer-menu-switch-other-window ()
280 "Make the other window select this line's buffer.
281The current window remains selected."
282 (interactive)
283 (display-buffer (Buffer-menu-buffer t)))
284
277(defun Buffer-menu-2-window () 285(defun Buffer-menu-2-window ()
278 "Select this line's buffer, with previous buffer in second window." 286 "Select this line's buffer, with previous buffer in second window."
279 (interactive) 287 (interactive)
diff --git a/lisp/files.el b/lisp/files.el
index 27c242b70da..f795278945c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1390,6 +1390,7 @@ With prefix arg, silently save all file-visiting buffers, then kill."
1390(define-key ctl-x-4-map "r" 'find-file-read-only-other-window) 1390(define-key ctl-x-4-map "r" 'find-file-read-only-other-window)
1391(define-key ctl-x-4-map "\C-f" 'find-file-other-window) 1391(define-key ctl-x-4-map "\C-f" 'find-file-other-window)
1392(define-key ctl-x-4-map "b" 'switch-to-buffer-other-window) 1392(define-key ctl-x-4-map "b" 'switch-to-buffer-other-window)
1393(define-key ctl-x-4-map "o" 'display-buffer)
1393 1394
1394(define-key ctl-x-5-map "b" 'switch-to-buffer-other-screen) 1395(define-key ctl-x-5-map "b" 'switch-to-buffer-other-screen)
1395(define-key ctl-x-5-map "f" 'find-file-other-screen) 1396(define-key ctl-x-5-map "f" 'find-file-other-screen)
diff --git a/src/window.c b/src/window.c
index b1876a219bb..20281235dac 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1471,7 +1471,8 @@ before each command.")
1471 return window; 1471 return window;
1472} 1472}
1473 1473
1474DEFUN ("display-buffer", Fdisplay_buffer, Sdisplay_buffer, 1, 2, 0, 1474DEFUN ("display-buffer", Fdisplay_buffer, Sdisplay_buffer, 1, 2,
1475 "BDisplay buffer:\nP",
1475 "Make BUFFER appear in some window but don't select it.\n\ 1476 "Make BUFFER appear in some window but don't select it.\n\
1476BUFFER can be a buffer or a buffer name.\n\ 1477BUFFER can be a buffer or a buffer name.\n\
1477If BUFFER is shown already in some window, just use that one,\n\ 1478If BUFFER is shown already in some window, just use that one,\n\