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
e75d337c
Commit
e75d337c
authored
May 01, 2002
by
Kim F. Storm
Browse files
(cua--pre-command-handler): Only interpret delete-selection property if mark-active.
parent
958e3d8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
lisp/emulation/cua-base.el
lisp/emulation/cua-base.el
+22
-21
No files found.
lisp/emulation/cua-base.el
View file @
e75d337c
...
...
@@ -875,27 +875,28 @@ Extra commands should be added to `cua-user-movement-commands'")
(
setq
deactivate-mark
t
)))
;; Handle delete-selection property on other commands
(
let*
((
ds
(
or
(
get
this-command
'delete-selection
)
(
get
this-command
'pending-delete
)))
(
nc
(
cond
((
eq
ds
'yank
)
'cua-paste
)
((
eq
ds
'kill
)
(
if
cua--rectangle
'cua-copy-rectangle
'cua-copy-region
))
((
eq
ds
'supersede
)
(
if
cua--rectangle
'cua-delete-rectangle
;; replace?
'cua-replace-region
))
(
ds
(
if
cua--rectangle
'cua-delete-rectangle
'cua-delete-region
))
(
t
nil
))))
(
if
nc
(
setq
this-original-command
this-command
this-command
nc
))))
(
if
(
and
mark-active
(
not
deactivate-mark
))
(
let*
((
ds
(
or
(
get
this-command
'delete-selection
)
(
get
this-command
'pending-delete
)))
(
nc
(
cond
((
not
ds
)
nil
)
((
eq
ds
'yank
)
'cua-paste
)
((
eq
ds
'kill
)
(
if
cua--rectangle
'cua-copy-rectangle
'cua-copy-region
))
((
eq
ds
'supersede
)
(
if
cua--rectangle
'cua-delete-rectangle
;; replace?
'cua-replace-region
))
(
t
(
if
cua--rectangle
'cua-delete-rectangle
'cua-delete-region
)))))
(
if
nc
(
setq
this-original-command
this-command
this-command
nc
)))))
;; Detect extension of rectangles by mouse or other movement
(
setq
cua--buffer-and-point-before-command
...
...
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