mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-27 10:54:40 +00:00
(cua--preserve-mark-commands): Remove.
(cua--undo-push-mark): Remove. (cua--pre-command-handler, cua--post-command-handler): Don't fiddle with inhibit-mark-movement.
This commit is contained in:
parent
90c08845df
commit
5acfef08ad
@ -1003,14 +1003,6 @@ Extra commands should be added to `cua-movement-commands'")
|
|||||||
(defvar cua-movement-commands nil
|
(defvar cua-movement-commands nil
|
||||||
"User may add additional movement commands to this list.")
|
"User may add additional movement commands to this list.")
|
||||||
|
|
||||||
(defvar cua--preserve-mark-commands
|
|
||||||
'(end-of-buffer beginning-of-buffer)
|
|
||||||
"List of movement commands that move the mark.
|
|
||||||
CUA will preserve the previous mark position if a mark is already
|
|
||||||
active before one of these commands is executed.")
|
|
||||||
|
|
||||||
(defvar cua--undo-push-mark nil)
|
|
||||||
|
|
||||||
;;; Scrolling commands which does not signal errors at top/bottom
|
;;; Scrolling commands which does not signal errors at top/bottom
|
||||||
;;; of buffer at first key-press (instead moves to top/bottom
|
;;; of buffer at first key-press (instead moves to top/bottom
|
||||||
;;; of buffer).
|
;;; of buffer).
|
||||||
@ -1100,11 +1092,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
|
|||||||
(aref (if window-system
|
(aref (if window-system
|
||||||
(this-single-command-raw-keys)
|
(this-single-command-raw-keys)
|
||||||
(this-single-command-keys)) 0)))
|
(this-single-command-keys)) 0)))
|
||||||
(if mark-active
|
(unless mark-active
|
||||||
(if (and (memq this-command cua--preserve-mark-commands)
|
|
||||||
(not inhibit-mark-movement))
|
|
||||||
(setq cua--undo-push-mark t
|
|
||||||
inhibit-mark-movement t))
|
|
||||||
(push-mark-command nil t))
|
(push-mark-command nil t))
|
||||||
(setq cua--last-region-shifted t)
|
(setq cua--last-region-shifted t)
|
||||||
(setq cua--explicit-region-start nil))
|
(setq cua--explicit-region-start nil))
|
||||||
@ -1151,9 +1139,6 @@ If ARG is the atom `-', scroll upward by nearly full screen."
|
|||||||
(defun cua--post-command-handler ()
|
(defun cua--post-command-handler ()
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(progn
|
(progn
|
||||||
(when cua--undo-push-mark
|
|
||||||
(setq cua--undo-push-mark nil
|
|
||||||
inhibit-mark-movement nil))
|
|
||||||
(when cua--global-mark-active
|
(when cua--global-mark-active
|
||||||
(cua--global-mark-post-command))
|
(cua--global-mark-post-command))
|
||||||
(when (fboundp 'cua--rectangle-post-command)
|
(when (fboundp 'cua--rectangle-post-command)
|
||||||
|
Loading…
Reference in New Issue
Block a user