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
c8c5bd24
Commit
c8c5bd24
authored
Jun 29, 1995
by
Richard M. Stallman
Browse files
(mouse-selection-click-count-buffer): New variable.
(mouse-drag-region): Set it. (mouse-save-then-kill): Test it.
parent
fe185b94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
lisp/mouse.el
lisp/mouse.el
+9
-1
No files found.
lisp/mouse.el
View file @
c8c5bd24
...
...
@@ -380,6 +380,8 @@ Upon exit, point is at the far edge of the newly visible text."
(
defvar
mouse-selection-click-count
0
)
(
defvar
mouse-selection-click-count-buffer
nil
)
(
defun
mouse-drag-region
(
start-event
)
"Set the region to the text that the mouse is dragged over.
Highlight the drag area as you move the mouse.
...
...
@@ -400,6 +402,7 @@ release the mouse button. Otherwise, it does not."
(
1-
(
nth
3
bounds
))))
(
click-count
(
1-
(
event-click-count
start-event
))))
(
setq
mouse-selection-click-count
click-count
)
(
setq
mouse-selection-click-count-buffer
(
current-buffer
))
(
mouse-set-point
start-event
)
(
let
((
range
(
mouse-start-end
start-point
start-point
click-count
)))
(
move-overlay
mouse-drag-overlay
(
car
range
)
(
nth
1
range
)
...
...
@@ -655,7 +658,12 @@ If you do this twice in the same position, the selection is killed."
;; Don't let a subsequent kill command append to this one:
;; prevent setting this-command to kill-region.
(
this-command
this-command
))
(
if
(
and
(
mark
t
)
(
>
(
mod
mouse-selection-click-count
3
)
0
))
(
if
(
and
(
save-excursion
(
set-buffer
(
window-buffer
(
posn-window
(
event-start
click
))))
(
and
(
mark
t
)
(
>
(
mod
mouse-selection-click-count
3
)
0
)
;; Don't be fooled by a recent click in some other buffer.
(
eq
mouse-selection-click-count-buffer
(
current-buffer
)))))
(
if
(
not
(
and
(
eq
last-command
'mouse-save-then-kill
)
(
equal
click-posn
(
car
(
cdr-safe
(
cdr-safe
mouse-save-then-kill-posn
))))))
...
...
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