diff options
| -rw-r--r-- | lisp/mouse.el | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index e73d74dfb42..81fdee47e5a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -413,20 +413,17 @@ release the mouse button. Otherwise, it does not." | |||
| 413 | (mouse-scroll-subr start-window (1+ (- mouse-row bottom)) | 413 | (mouse-scroll-subr start-window (1+ (- mouse-row bottom)) |
| 414 | mouse-drag-overlay start-point))))))))) | 414 | mouse-drag-overlay start-point))))))))) |
| 415 | (if (consp event) | 415 | (if (consp event) |
| 416 | ;;; When we scroll into the mode line or menu bar, or out of the window, | ||
| 417 | ;;; we get events that don't fit these criteria. | ||
| 418 | ;;; (eq (get (event-basic-type event) 'event-kind) 'mouse-click) | ||
| 419 | ;;; (eq (posn-window (event-end event)) start-window) | ||
| 420 | ;;; (numberp (posn-point (event-end event))) | ||
| 421 | (let ((fun (key-binding (vector (car event))))) | 416 | (let ((fun (key-binding (vector (car event))))) |
| 422 | (if (not (= (overlay-start mouse-drag-overlay) | 417 | (if (fboundp fun) |
| 423 | (overlay-end mouse-drag-overlay))) | 418 | (funcall fun event) |
| 424 | (let (last-command this-command) | 419 | (if (not (= (overlay-start mouse-drag-overlay) |
| 425 | (push-mark (overlay-start mouse-drag-overlay) t t) | 420 | (overlay-end mouse-drag-overlay))) |
| 426 | (goto-char (overlay-end mouse-drag-overlay)) | 421 | (let (last-command this-command) |
| 427 | (copy-region-as-kill (point) (mark t))) | 422 | (push-mark (overlay-start mouse-drag-overlay) t t) |
| 428 | (goto-char (overlay-end mouse-drag-overlay)) | 423 | (goto-char (overlay-end mouse-drag-overlay)) |
| 429 | (setq this-command 'mouse-set-point)))) | 424 | (copy-region-as-kill (point) (mark t))) |
| 425 | (goto-char (overlay-end mouse-drag-overlay)) | ||
| 426 | (setq this-command 'mouse-set-point))))) | ||
| 430 | (delete-overlay mouse-drag-overlay)))) | 427 | (delete-overlay mouse-drag-overlay)))) |
| 431 | 428 | ||
| 432 | ;; Commands to handle xterm-style multiple clicks. | 429 | ;; Commands to handle xterm-style multiple clicks. |