[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 672fb2c: Make ido-display-buffer work interactively
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 672fb2c: Make ido-display-buffer work interactively more like display-buffer |
Date: |
Mon, 7 Oct 2019 11:14:20 -0400 (EDT) |
branch: master
commit 672fb2c769512730ba6dabe6f95dd1aa94aeb489
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make ido-display-buffer work interactively more like display-buffer
* lisp/ido.el (ido-display-buffer): Take an interactive parameter,
like `display-buffer' (bug#14904).
(ido-visit-buffer): Use it to emulate `C-u M-x display-buffer'.
---
lisp/ido.el | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/lisp/ido.el b/lisp/ido.el
index faa6e67..1cfcb0f 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -4141,6 +4141,9 @@ Record command in `command-history' if optional RECORD is
non-nil."
((eq method 'display)
(display-buffer buffer))
+ ((eq method 'display-even-when-displayed)
+ (display-buffer buffer t))
+
((eq method 'other-frame)
(switch-to-buffer-other-frame buffer)
(select-frame-set-input-focus (selected-frame)))
@@ -4225,12 +4228,20 @@ For details of keybindings, see `ido-switch-buffer'."
(ido-buffer-internal 'other-window 'switch-to-buffer-other-window))
;;;###autoload
-(defun ido-display-buffer ()
+(defun ido-display-buffer (&optional action)
"Display a buffer in another window but don't select it.
+
+If ACTION (the prefix argument interactively), display the buffer
+in another windown even if it's already displayed in the current
+window.
+
The buffer name is selected interactively by typing a substring.
For details of keybindings, see `ido-switch-buffer'."
- (interactive)
- (ido-buffer-internal 'display 'display-buffer nil nil nil 'ignore))
+ (interactive "P")
+ (ido-buffer-internal (if action
+ 'display-even-when-displayed
+ 'display)
+ 'display-buffer nil nil nil 'ignore))
;;;###autoload
(defun ido-display-buffer-other-frame ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 672fb2c: Make ido-display-buffer work interactively more like display-buffer,
Lars Ingebrigtsen <=