1003 |
(defvar cua-movement-commands nil |
(defvar cua-movement-commands nil |
1004 |
"User may add additional movement commands to this list.") |
"User may add additional movement commands to this list.") |
1005 |
|
|
|
(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) |
|
|
|
|
1006 |
;;; Scrolling commands which does not signal errors at top/bottom |
;;; Scrolling commands which does not signal errors at top/bottom |
1007 |
;;; of buffer at first key-press (instead moves to top/bottom |
;;; of buffer at first key-press (instead moves to top/bottom |
1008 |
;;; of buffer). |
;;; of buffer). |
1092 |
(aref (if window-system |
(aref (if window-system |
1093 |
(this-single-command-raw-keys) |
(this-single-command-raw-keys) |
1094 |
(this-single-command-keys)) 0))) |
(this-single-command-keys)) 0))) |
1095 |
(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)) |
|
1096 |
(push-mark-command nil t)) |
(push-mark-command nil t)) |
1097 |
(setq cua--last-region-shifted t) |
(setq cua--last-region-shifted t) |
1098 |
(setq cua--explicit-region-start nil)) |
(setq cua--explicit-region-start nil)) |
1139 |
(defun cua--post-command-handler () |
(defun cua--post-command-handler () |
1140 |
(condition-case nil |
(condition-case nil |
1141 |
(progn |
(progn |
|
(when cua--undo-push-mark |
|
|
(setq cua--undo-push-mark nil |
|
|
inhibit-mark-movement nil)) |
|
1142 |
(when cua--global-mark-active |
(when cua--global-mark-active |
1143 |
(cua--global-mark-post-command)) |
(cua--global-mark-post-command)) |
1144 |
(when (fboundp 'cua--rectangle-post-command) |
(when (fboundp 'cua--rectangle-post-command) |