Commit 672fb2c7 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

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'.
parent 130b1321
Pipeline #3492 failed with stage
in 59 minutes and 5 seconds
......@@ -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))
(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
The buffer name is selected interactively by typing a substring.
For details of keybindings, see `ido-switch-buffer'."
(ido-buffer-internal 'display 'display-buffer nil nil nil 'ignore))
(interactive "P")
(ido-buffer-internal (if action
'display-buffer nil nil nil 'ignore))
(defun ido-display-buffer-other-frame ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment