diff options
| author | Richard M. Stallman | 1994-12-26 05:09:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-26 05:09:41 +0000 |
| commit | 33c448cd1a819ef9a2d83f4c87201615655c2bfe (patch) | |
| tree | b065c32f29832a66165709f8d4c7baee701dda14 | |
| parent | 6e5cd0ae315d1bc9d1c34c8b4847e7b1c1fa2991 (diff) | |
| download | emacs-33c448cd1a819ef9a2d83f4c87201615655c2bfe.tar.gz emacs-33c448cd1a819ef9a2d83f4c87201615655c2bfe.zip | |
(mouse-minibuffer-check, mouse-drag-mode-line)
(mouse-yank-at-click, mouse-yank-secondary, mouse-choose-completion):
Run mouse-leave-buffer-hook.
| -rw-r--r-- | lisp/mouse.el | 12 |
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 @@ | |||
| 100 | (let ((w (posn-window (event-start event)))) | 100 | (let ((w (posn-window (event-start event)))) |
| 101 | (and (window-minibuffer-p w) | 101 | (and (window-minibuffer-p w) |
| 102 | (not (minibuffer-window-active-p w)) | 102 | (not (minibuffer-window-active-p w)) |
| 103 | (error "Minibuffer window is not active")))) | 103 | (error "Minibuffer window is not active"))) |
| 104 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 105 | (run-hooks 'mouse-leave-buffer-hook)) | ||
| 104 | 106 | ||
| 105 | (defun mouse-delete-window (click) | 107 | (defun mouse-delete-window (click) |
| 106 | "Delete the window you click on. | 108 | "Delete the window you click on. |
| @@ -173,6 +175,8 @@ This command must be bound to a mouse click." | |||
| 173 | (defun mouse-drag-mode-line (start-event) | 175 | (defun mouse-drag-mode-line (start-event) |
| 174 | "Change the height of a window by dragging on the mode line." | 176 | "Change the height of a window by dragging on the mode line." |
| 175 | (interactive "e") | 177 | (interactive "e") |
| 178 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 179 | (run-hooks 'mouse-leave-buffer-hook) | ||
| 176 | (let ((done nil) | 180 | (let ((done nil) |
| 177 | (echo-keystrokes 0) | 181 | (echo-keystrokes 0) |
| 178 | (start-event-frame (window-frame (car (car (cdr start-event))))) | 182 | (start-event-frame (window-frame (car (car (cdr start-event))))) |
| @@ -543,6 +547,8 @@ Prefix arguments are interpreted as with \\[yank]. | |||
| 543 | If `mouse-yank-at-point' is non-nil, insert at point | 547 | If `mouse-yank-at-point' is non-nil, insert at point |
| 544 | regardless of where you click." | 548 | regardless of where you click." |
| 545 | (interactive "e\nP") | 549 | (interactive "e\nP") |
| 550 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 551 | (run-hooks 'mouse-leave-buffer-hook) | ||
| 546 | (or mouse-yank-at-point (mouse-set-point click)) | 552 | (or mouse-yank-at-point (mouse-set-point click)) |
| 547 | (setq this-command 'yank) | 553 | (setq this-command 'yank) |
| 548 | (yank arg)) | 554 | (yank arg)) |
| @@ -827,6 +833,8 @@ Move point to the end of the inserted text. | |||
| 827 | If `mouse-yank-at-point' is non-nil, insert at point | 833 | If `mouse-yank-at-point' is non-nil, insert at point |
| 828 | regardless of where you click." | 834 | regardless of where you click." |
| 829 | (interactive "e") | 835 | (interactive "e") |
| 836 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 837 | (run-hooks 'mouse-leave-buffer-hook) | ||
| 830 | (or mouse-yank-at-point (mouse-set-point click)) | 838 | (or mouse-yank-at-point (mouse-set-point click)) |
| 831 | (insert (x-get-selection 'SECONDARY))) | 839 | (insert (x-get-selection 'SECONDARY))) |
| 832 | 840 | ||
| @@ -1348,6 +1356,8 @@ and selects that window." | |||
| 1348 | (defun mouse-choose-completion (event) | 1356 | (defun mouse-choose-completion (event) |
| 1349 | "Click on an alternative in the `*Completions*' buffer to choose it." | 1357 | "Click on an alternative in the `*Completions*' buffer to choose it." |
| 1350 | (interactive "e") | 1358 | (interactive "e") |
| 1359 | ;; Give temporary modes such as isearch a chance to turn off. | ||
| 1360 | (run-hooks 'mouse-leave-buffer-hook) | ||
| 1351 | (let ((buffer (window-buffer)) | 1361 | (let ((buffer (window-buffer)) |
| 1352 | choice | 1362 | choice |
| 1353 | base-size) | 1363 | base-size) |