[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68978: Fix Buffer-menu-other-window to display buffers in other wind
From: |
Juri Linkov |
Subject: |
bug#68978: Fix Buffer-menu-other-window to display buffers in other window |
Date: |
Wed, 07 Feb 2024 19:28:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
Tags: patch
Here is the patch that fixes Buffer-menu-other-window
and Buffer-menu-switch-other-window to inhibit the same window
that will display the buffer in another window:
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index b13492c5002..1645cda7df0 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -592,13 +592,17 @@ Buffer-menu-this-window
(defun Buffer-menu-other-window ()
"Select this line's buffer in other window, leaving buffer menu visible."
(interactive nil Buffer-menu-mode)
- (switch-to-buffer-other-window (Buffer-menu-buffer t)))
+ (let ((display-buffer-overriding-action
+ '(nil (inhibit-same-window . t))))
+ (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 nil Buffer-menu-mode)
- (display-buffer (Buffer-menu-buffer t) t))
+ (let ((display-buffer-overriding-action
+ '(nil (inhibit-same-window . t))))
+ (display-buffer (Buffer-menu-buffer t) t)))
(defun Buffer-menu-2-window ()
"Select this line's buffer, with previous buffer in second window."
- bug#68978: Fix Buffer-menu-other-window to display buffers in other window,
Juri Linkov <=