diff options
| author | Richard M. Stallman | 2005-11-03 21:37:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-11-03 21:37:21 +0000 |
| commit | c3bb6d703f0448f24112579ff51917d137812f7f (patch) | |
| tree | 55c97911465b3ec700850c88071207210930755e | |
| parent | bf71490505cb3c6781f812d8cd92b1ee2e8fe9c7 (diff) | |
| download | emacs-c3bb6d703f0448f24112579ff51917d137812f7f.tar.gz emacs-c3bb6d703f0448f24112579ff51917d137812f7f.zip | |
Fix special handling of DEL after dragging a region:
(mouse-drag-region-1): Treat mouse-set-region like mouse-set-point.
(mouse-region-delete-keys): Add [backspace].
| -rw-r--r-- | lisp/mouse.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 743aba94d5e..0aab1a99bb6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -961,7 +961,7 @@ at the same position." | |||
| 961 | (let* ((fun (key-binding (vector (car event)))) | 961 | (let* ((fun (key-binding (vector (car event)))) |
| 962 | (do-multi-click (and (> (event-click-count event) 0) | 962 | (do-multi-click (and (> (event-click-count event) 0) |
| 963 | (functionp fun) | 963 | (functionp fun) |
| 964 | (not (eq fun 'mouse-set-point))))) | 964 | (not (memq fun '(mouse-set-point mouse-set-region)))))) |
| 965 | ;; Run the binding of the terminating up-event, if possible. | 965 | ;; Run the binding of the terminating up-event, if possible. |
| 966 | (if (and (not (= (overlay-start mouse-drag-overlay) | 966 | (if (and (not (= (overlay-start mouse-drag-overlay) |
| 967 | (overlay-end mouse-drag-overlay))) | 967 | (overlay-end mouse-drag-overlay))) |
| @@ -1075,7 +1075,7 @@ If DIR is positive skip forward; if negative, skip backward." | |||
| 1075 | (forward-char 1)))))) | 1075 | (forward-char 1)))))) |
| 1076 | 1076 | ||
| 1077 | (defun mouse-start-end (start end mode) | 1077 | (defun mouse-start-end (start end mode) |
| 1078 | "Return a list of region bounds based on START and END according to MODE. | 1078 | "Return a list of region bounds based on START and END according to MODE. |
| 1079 | If MODE is 0 then set point to (min START END), mark to (max START END). | 1079 | If MODE is 0 then set point to (min START END), mark to (max START END). |
| 1080 | If MODE is 1 then set point to start of word at (min START END), | 1080 | If MODE is 1 then set point to start of word at (min START END), |
| 1081 | mark to end of word at (max START END). | 1081 | mark to end of word at (max START END). |
| @@ -1181,8 +1181,10 @@ If MODE is 2 then do the same for lines." | |||
| 1181 | 1181 | ||
| 1182 | ;; Momentarily show where the mark is, if highlighting doesn't show it. | 1182 | ;; Momentarily show where the mark is, if highlighting doesn't show it. |
| 1183 | 1183 | ||
| 1184 | (defvar mouse-region-delete-keys '([delete] [deletechar]) | 1184 | (defcustom mouse-region-delete-keys '([delete] [deletechar] [backspace]) |
| 1185 | "List of keys which shall cause the mouse region to be deleted.") | 1185 | "List of keys that should cause the mouse region to be deleted." |
| 1186 | :group 'mouse | ||
| 1187 | :type '(repeat key-sequence)) | ||
| 1186 | 1188 | ||
| 1187 | (defun mouse-show-mark () | 1189 | (defun mouse-show-mark () |
| 1188 | (let ((inhibit-quit t) | 1190 | (let ((inhibit-quit t) |