Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
917baba0
Commit
917baba0
authored
Apr 26, 1996
by
Richard M. Stallman
Browse files
(mouse-drag-region): Leave region highlighted until the next input event.
parent
6d078211
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lisp/mouse.el
lisp/mouse.el
+7
-3
No files found.
lisp/mouse.el
View file @
917baba0
...
...
@@ -560,7 +560,7 @@ release the mouse button. Otherwise, it does not."
;; Run the binding of the terminating up-event, if possible.
;; In the case of a multiple click, it gives the wrong results,
;; because it would fail to set up a region.
(
if
(
and
(
=
(
mod
mouse-selection-click-count
3
)
0
)
(
fboundp
fun
))
(
if
nil
;;
(and (= (mod mouse-selection-click-count 3) 0) (fboundp fun))
;; In this case, we can just let the up-event execute normally.
(
let
((
end
(
event-end
event
)))
;; Set the position in the event before we replay it,
...
...
@@ -575,11 +575,15 @@ release the mouse button. Otherwise, it does not."
(
if
(
not
(
=
(
overlay-start
mouse-drag-overlay
)
(
overlay-end
mouse-drag-overlay
)))
(
let
(
last-command
this-command
)
(
let
((
inhibit-quit
t
))
(
setq
unread-command-events
(
cons
(
read-event
)
unread-command-events
))
(
setq
quit-flag
nil
))
(
push-mark
(
overlay-start
mouse-drag-overlay
)
t
t
)
(
goto-char
(
overlay-end
mouse-drag-overlay
))
(
delete-overlay
mouse-drag-overlay
)
(
copy-region-as-kill
(
point
)
(
mark
t
))
(
mouse-set-region-1
))
(
mouse-set-region-1
)
(
delete-overlay
mouse-drag-overlay
))
(
goto-char
(
overlay-end
mouse-drag-overlay
))
(
setq
this-command
'mouse-set-point
)
(
delete-overlay
mouse-drag-overlay
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment