summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-26 05:09:41 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-26 05:09:41 +0000
commite9e906a3fc4826d51e5467e81b2ad41940b65015 (patch)
tree6a560bda4330d6f41c8dd0525c1bf4251b5e163d /lisp/mouse.el
parent074406b987bad025b8e18f3728051edf9d7eb073 (diff)
downloademacs-e9e906a3fc4826d51e5467e81b2ad41940b65015.tar.gz
(mouse-minibuffer-check, mouse-drag-mode-line)
(mouse-yank-at-click, mouse-yank-secondary, mouse-choose-completion): Run mouse-leave-buffer-hook.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 6ee1cfb0fbc..e73d74dfb42 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -100,7 +100,9 @@
(let ((w (posn-window (event-start event))))
(and (window-minibuffer-p w)
(not (minibuffer-window-active-p w))
- (error "Minibuffer window is not active"))))
+ (error "Minibuffer window is not active")))
+ ;; Give temporary modes such as isearch a chance to turn off.
+ (run-hooks 'mouse-leave-buffer-hook))
(defun mouse-delete-window (click)
"Delete the window you click on.
@@ -173,6 +175,8 @@ This command must be bound to a mouse click."
(defun mouse-drag-mode-line (start-event)
"Change the height of a window by dragging on the mode line."
(interactive "e")
+ ;; Give temporary modes such as isearch a chance to turn off.
+ (run-hooks 'mouse-leave-buffer-hook)
(let ((done nil)
(echo-keystrokes 0)
(start-event-frame (window-frame (car (car (cdr start-event)))))
@@ -543,6 +547,8 @@ Prefix arguments are interpreted as with \\[yank].
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
(interactive "e\nP")
+ ;; Give temporary modes such as isearch a chance to turn off.
+ (run-hooks 'mouse-leave-buffer-hook)
(or mouse-yank-at-point (mouse-set-point click))
(setq this-command 'yank)
(yank arg))
@@ -827,6 +833,8 @@ Move point to the end of the inserted text.
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
(interactive "e")
+ ;; Give temporary modes such as isearch a chance to turn off.
+ (run-hooks 'mouse-leave-buffer-hook)
(or mouse-yank-at-point (mouse-set-point click))
(insert (x-get-selection 'SECONDARY)))
@@ -1348,6 +1356,8 @@ and selects that window."
(defun mouse-choose-completion (event)
"Click on an alternative in the `*Completions*' buffer to choose it."
(interactive "e")
+ ;; Give temporary modes such as isearch a chance to turn off.
+ (run-hooks 'mouse-leave-buffer-hook)
(let ((buffer (window-buffer))
choice
base-size)