# HG changeset patch # User Richard M. Stallman # Date 788418581 0 # Node ID 0bcc67b3fe667e9228768b40c82ce8c8791b370e # Parent d530ba7eb4711d28cd5cdd383ee26a0ef81bcd59 (mouse-minibuffer-check, mouse-drag-mode-line) (mouse-yank-at-click, mouse-yank-secondary, mouse-choose-completion): Run mouse-leave-buffer-hook. diff -r d530ba7eb471 -r 0bcc67b3fe66 lisp/mouse.el --- a/lisp/mouse.el Mon Dec 26 05:09:07 1994 +0000 +++ b/lisp/mouse.el Mon Dec 26 05:09:41 1994 +0000 @@ -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 @@ (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 @@ 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 @@ 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 @@ (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)