diff options
| -rw-r--r-- | lisp/mouse.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index ef41a38caad..de0735529f7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1021,7 +1021,8 @@ This must be bound to a mouse drag event." | |||
| 1021 | (defun mouse-drag-secondary (start-event) | 1021 | (defun mouse-drag-secondary (start-event) |
| 1022 | "Set the secondary selection to the text that the mouse is dragged over. | 1022 | "Set the secondary selection to the text that the mouse is dragged over. |
| 1023 | Highlight the drag area as you move the mouse. | 1023 | Highlight the drag area as you move the mouse. |
| 1024 | This must be bound to a button-down mouse event." | 1024 | This must be bound to a button-down mouse event. |
| 1025 | The function returns a non-nil value if it creates a secondary selection." | ||
| 1025 | (interactive "e") | 1026 | (interactive "e") |
| 1026 | (mouse-minibuffer-check start-event) | 1027 | (mouse-minibuffer-check start-event) |
| 1027 | (let* ((echo-keystrokes 0) | 1028 | (let* ((echo-keystrokes 0) |
| @@ -1092,9 +1093,6 @@ This must be bound to a button-down mouse event." | |||
| 1092 | mouse-secondary-overlay start-point))))))))) | 1093 | mouse-secondary-overlay start-point))))))))) |
| 1093 | 1094 | ||
| 1094 | (if (consp event) | 1095 | (if (consp event) |
| 1095 | ;;; (eq (get (event-basic-type event) 'event-kind) 'mouse-click) | ||
| 1096 | ;;; (eq (posn-window (event-end event)) start-window) | ||
| 1097 | ;;; (numberp (posn-point (event-end event))) | ||
| 1098 | (if (marker-position mouse-secondary-start) | 1096 | (if (marker-position mouse-secondary-start) |
| 1099 | (save-window-excursion | 1097 | (save-window-excursion |
| 1100 | (delete-overlay mouse-secondary-overlay) | 1098 | (delete-overlay mouse-secondary-overlay) |
| @@ -1102,7 +1100,8 @@ This must be bound to a button-down mouse event." | |||
| 1102 | (select-window start-window) | 1100 | (select-window start-window) |
| 1103 | (save-excursion | 1101 | (save-excursion |
| 1104 | (goto-char mouse-secondary-start) | 1102 | (goto-char mouse-secondary-start) |
| 1105 | (sit-for 1))) | 1103 | (sit-for 1) |
| 1104 | nil)) | ||
| 1106 | (x-set-selection | 1105 | (x-set-selection |
| 1107 | 'SECONDARY | 1106 | 'SECONDARY |
| 1108 | (buffer-substring (overlay-start mouse-secondary-overlay) | 1107 | (buffer-substring (overlay-start mouse-secondary-overlay) |