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
f479ef6e
Commit
f479ef6e
authored
Jul 11, 2010
by
Chong Yidong
Browse files
* mouse.el (mouse-drag-track): Handle select-active-regions (Bug#6612).
parent
c8fc18ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/mouse.el
lisp/mouse.el
+16
-4
No files found.
lisp/ChangeLog
View file @
f479ef6e
2010-07-11 Chong Yidong <cyd@stupidchicken.com>
* mouse.el (mouse-drag-track): Handle select-active-regions
(Bug#6612).
2010-07-11 Magnus Henoch <magnus.henoch@gmail.com>
* net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass
...
...
lisp/mouse.el
View file @
f479ef6e
...
...
@@ -956,9 +956,12 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(
if
(
eq
transient-mark-mode
'lambda
)
'
(
only
)
(
cons
'only
transient-mark-mode
)))
(
let
((
range
(
mouse-start-end
start-point
start-point
click-count
)))
(
let
((
range
(
mouse-start-end
start-point
start-point
click-count
))
;; Prevent `push-mark' from clobbering the primary selection
;; if the user clicks without dragging.
(
select-active-regions
nil
))
(
goto-char
(
nth
0
range
))
(
push-mark
nil
nil
t
)
(
push-mark
nil
t
t
)
(
goto-char
(
nth
1
range
)))
;; Track the mouse until we get a non-movement event.
...
...
@@ -1012,6 +1015,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
mouse-set-region
))))))
(
if
(
and
(
/=
(
mark
)
(
point
))
(
not
do-multi-click
))
;; If point has moved, finish the drag.
(
let*
(
last-command
this-command
)
;; Copy the region so that `select-active-regions' can
...
...
@@ -1019,12 +1023,20 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(
and
mouse-drag-copy-region
do-mouse-drag-region-post-process
(
let
(
deactivate-mark
)
(
copy-region-as-kill
(
mark
)
(
point
)))))
(
copy-region-as-kill
(
mark
)
(
point
))))
;; For `select-active-regions' non-nil, ensure that
;; further alterations of the region (e.g. via
;; shift-selection) continue to update PRIMARY.
(
and
select-active-regions
(
display-selections-p
)
(
x-set-selection
'PRIMARY
(
current-buffer
))))
;; If point hasn't moved, run the binding of the
;; terminating up-event.
(
if
do-multi-click
(
goto-char
start-point
)
(
deactivate-mark
))
(
let
(
select-active-regions
)
(
deactivate-mark
)))
(
when
(
and
(
functionp
fun
)
(
=
start-hscroll
(
window-hscroll
start-window
))
;; Don't run the up-event handler if the window
...
...
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