mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Handle multiple mouse events in display-buffer-override-next-command
* lisp/window.el (display-buffer-override-next-command): Use 'mouse-event-p' to wait for more following mouse events. * lisp/frame.el (other-frame-prefix): * lisp/tab-bar.el (other-tab-prefix): * lisp/windmove.el (windmove-display-in-direction): * lisp/window.el (other-window-prefix, same-window-prefix): Update the docstring to explain the behavior in regard to multiple consecutive mouse events (bug#78945).
This commit is contained in:
parent
159ddd27ee
commit
280d6f70a3
4 changed files with 18 additions and 3 deletions
|
|
@ -1262,6 +1262,9 @@ that variable should be nil."
|
|||
"Display the buffer of the next command in a new frame.
|
||||
The next buffer is the buffer displayed by the next command invoked
|
||||
immediately after this command (ignoring reading from the minibuffer).
|
||||
In case of multiple consecutive mouse events such as <down-mouse-1>,
|
||||
a mouse release event <mouse-1>, <double-mouse-1>, <triple-mouse-1>
|
||||
all bound commands are handled until one of them displays a buffer.
|
||||
Creates a new frame before displaying the buffer.
|
||||
When `switch-to-buffer-obey-display-actions' is non-nil,
|
||||
`switch-to-buffer' commands are also supported."
|
||||
|
|
|
|||
|
|
@ -3043,6 +3043,9 @@ files will be visited."
|
|||
"Display the buffer of the next command in a new tab.
|
||||
The next buffer is the buffer displayed by the next command invoked
|
||||
immediately after this command (ignoring reading from the minibuffer).
|
||||
In case of multiple consecutive mouse events such as <down-mouse-1>,
|
||||
a mouse release event <mouse-1>, <double-mouse-1>, <triple-mouse-1>
|
||||
all bound commands are handled until one of them displays a buffer.
|
||||
Creates a new tab before displaying the buffer, or switches to the tab
|
||||
that already contains that buffer.
|
||||
When `switch-to-buffer-obey-display-actions' is non-nil,
|
||||
|
|
|
|||
|
|
@ -586,6 +586,9 @@ When `switch-to-buffer-obey-display-actions' is non-nil,
|
|||
"Display the next buffer in the window at direction DIR.
|
||||
The next buffer is the buffer displayed by the next command invoked
|
||||
immediately after this command (ignoring reading from the minibuffer).
|
||||
In case of multiple consecutive mouse events such as <down-mouse-1>,
|
||||
a mouse release event <mouse-1>, <double-mouse-1>, <triple-mouse-1>
|
||||
all bound commands are handled until one of them displays a buffer.
|
||||
Create a new window if there is no window in that direction.
|
||||
|
||||
By default, select the new window with a displayed buffer.
|
||||
|
|
|
|||
|
|
@ -4076,6 +4076,9 @@ always effectively nil."
|
|||
"Display the buffer of the next command in a new window.
|
||||
The next buffer is the buffer displayed by the next command invoked
|
||||
immediately after this command (ignoring reading from the minibuffer).
|
||||
In case of multiple consecutive mouse events such as <down-mouse-1>,
|
||||
a mouse release event <mouse-1>, <double-mouse-1>, <triple-mouse-1>
|
||||
all bound commands are handled until one of them displays a buffer.
|
||||
Creates a new window before displaying the buffer.
|
||||
When `switch-to-buffer-obey-display-actions' is non-nil,
|
||||
`switch-to-buffer' commands are also supported."
|
||||
|
|
@ -4096,6 +4099,9 @@ When `switch-to-buffer-obey-display-actions' is non-nil,
|
|||
"Display the buffer of the next command in the same window.
|
||||
The next buffer is the buffer displayed by the next command invoked
|
||||
immediately after this command (ignoring reading from the minibuffer).
|
||||
In case of multiple consecutive mouse events such as <down-mouse-1>,
|
||||
a mouse release event <mouse-1>, <double-mouse-1>, <triple-mouse-1>
|
||||
all bound commands are handled until one of them displays a buffer.
|
||||
Even when the default rule should display the buffer in a new window,
|
||||
force its display in the already selected window.
|
||||
When `switch-to-buffer-obey-display-actions' is non-nil,
|
||||
|
|
@ -9673,9 +9679,9 @@ to deactivate this overriding action."
|
|||
;; But don't remove immediately after
|
||||
;; adding the hook by the same command below.
|
||||
(eq this-command command)
|
||||
;; Don't exit on mouse down event
|
||||
;; in anticipation of mouse release event.
|
||||
(memq 'down (event-modifiers last-input-event)))
|
||||
;; Don't exit on mouse events in anticipation
|
||||
;; of more related events like double click.
|
||||
(mouse-event-p last-input-event))
|
||||
(funcall exitfun))))
|
||||
;; Call post-function after the next command finishes (bug#49057).
|
||||
(add-hook 'post-command-hook postfun)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue