From 35aaf00cff31d60c5d1a06a7db872d1facb5a8b5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 2 Jul 1992 02:36:29 +0000 Subject: [PATCH] *** empty log message *** --- lisp/buff-menu.el | 12 ++++++++++-- lisp/files.el | 1 + src/window.c | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 371bb586d8..6682f42c68 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -1,12 +1,12 @@ ;;; buff-menu.el --- buffer menu main function and support functions. -;; Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 1, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -33,6 +33,7 @@ (define-key Buffer-menu-mode-map "1" 'Buffer-menu-1-window) (define-key Buffer-menu-mode-map "f" 'Buffer-menu-this-window) (define-key Buffer-menu-mode-map "o" 'Buffer-menu-other-window) + (define-key Buffer-menu-mode-map "\C-o" 'Buffer-menu-switch-other-window) (define-key Buffer-menu-mode-map "s" 'Buffer-menu-save) (define-key Buffer-menu-mode-map "d" 'Buffer-menu-delete) (define-key Buffer-menu-mode-map "k" 'Buffer-menu-delete) @@ -66,6 +67,7 @@ Letters do not insert themselves; instead, they are commands. \\[Buffer-menu-this-window] -- select that buffer in place of the buffer menu buffer. \\[Buffer-menu-other-window] -- select that buffer in another window, so the buffer menu buffer remains visible in its window. +\\[Buffer-menu-switch-other-window] -- switch the other window to this buffer. \\[Buffer-menu-visit-tags-table] -- visit-tags-table this buffer. \\[Buffer-menu-not-modified] -- clear modified-flag on that buffer. \\[Buffer-menu-save] -- mark that buffer to be saved, and move down. @@ -274,6 +276,12 @@ You can mark buffers with the \\\\[Buffer-menu-mark] comma (interactive) (switch-to-buffer-other-window (Buffer-menu-buffer t))) +(defun Buffer-menu-switch-other-window () + "Make the other window select this line's buffer. +The current window remains selected." + (interactive) + (display-buffer (Buffer-menu-buffer t))) + (defun Buffer-menu-2-window () "Select this line's buffer, with previous buffer in second window." (interactive) diff --git a/lisp/files.el b/lisp/files.el index 27c242b70d..f795278945 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1390,6 +1390,7 @@ With prefix arg, silently save all file-visiting buffers, then kill." (define-key ctl-x-4-map "r" 'find-file-read-only-other-window) (define-key ctl-x-4-map "\C-f" 'find-file-other-window) (define-key ctl-x-4-map "b" 'switch-to-buffer-other-window) +(define-key ctl-x-4-map "o" 'display-buffer) (define-key ctl-x-5-map "b" 'switch-to-buffer-other-screen) (define-key ctl-x-5-map "f" 'find-file-other-screen) diff --git a/src/window.c b/src/window.c index b1876a219b..20281235da 100644 --- a/src/window.c +++ b/src/window.c @@ -1471,7 +1471,8 @@ before each command.") return window; } -DEFUN ("display-buffer", Fdisplay_buffer, Sdisplay_buffer, 1, 2, 0, +DEFUN ("display-buffer", Fdisplay_buffer, Sdisplay_buffer, 1, 2, + "BDisplay buffer:\nP", "Make BUFFER appear in some window but don't select it.\n\ BUFFER can be a buffer or a buffer name.\n\ If BUFFER is shown already in some window, just use that one,\n\ -- 2.20.1