575 |
|
|
576 |
;; Current region was started using cua-set-mark. |
;; Current region was started using cua-set-mark. |
577 |
(defvar cua--explicit-region-start nil) |
(defvar cua--explicit-region-start nil) |
578 |
|
(make-variable-buffer-local 'cua--explicit-region-start) |
579 |
|
|
580 |
;; Latest region was started using shifted movement command. |
;; Latest region was started using shifted movement command. |
581 |
(defvar cua--last-region-shifted nil) |
(defvar cua--last-region-shifted nil) |
586 |
|
|
587 |
;; status string for mode line indications |
;; status string for mode line indications |
588 |
(defvar cua--status-string nil) |
(defvar cua--status-string nil) |
589 |
|
(make-variable-buffer-local 'cua--status-string) |
590 |
|
|
591 |
(defvar cua--debug nil) |
(defvar cua--debug nil) |
592 |
|
|
761 |
(cons (current-buffer) |
(cons (current-buffer) |
762 |
(and (consp buffer-undo-list) |
(and (consp buffer-undo-list) |
763 |
(car buffer-undo-list)))) |
(car buffer-undo-list)))) |
764 |
(cua--deactivate))) |
(cua--deactivate) |
765 |
|
(/= start end))) |
766 |
|
|
767 |
(defun cua-replace-region () |
(defun cua-replace-region () |
768 |
"Replace the active region with the character you type." |
"Replace the active region with the character you type." |
769 |
(interactive) |
(interactive) |
770 |
(cua-delete-region) |
(let ((not-empty (cua-delete-region))) |
771 |
(unless (eq this-original-command this-command) |
(unless (eq this-original-command this-command) |
772 |
(cua--fallback))) |
(let ((overwrite-mode |
773 |
|
(and overwrite-mode |
774 |
|
not-empty |
775 |
|
(not (eq this-original-command 'self-insert-command))))) |
776 |
|
(cua--fallback))))) |
777 |
|
|
778 |
(defun cua-copy-region (arg) |
(defun cua-copy-region (arg) |
779 |
"Copy the region to the kill ring. |
"Copy the region to the kill ring. |
1366 |
:link '(emacs-commentary-link "cua-base.el") |
:link '(emacs-commentary-link "cua-base.el") |
1367 |
(setq mark-even-if-inactive t) |
(setq mark-even-if-inactive t) |
1368 |
(setq highlight-nonselected-windows nil) |
(setq highlight-nonselected-windows nil) |
|
(make-variable-buffer-local 'cua--explicit-region-start) |
|
|
(make-variable-buffer-local 'cua--status-string) |
|
1369 |
|
|
1370 |
(unless cua--keymaps-initalized |
(unless cua--keymaps-initalized |
1371 |
(cua--init-keymaps) |
(cua--init-keymaps) |