Mercurial > emacs
diff lisp/emulation/cua-base.el @ 90224:2d92f5c9d6ae
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 514-518)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 104-105)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 26 Aug 2005 09:51:52 +0000 |
parents | edf295560b5a 6b11882571cb |
children | b1c1fc853d2f |
line wrap: on
line diff
--- a/lisp/emulation/cua-base.el Fri Aug 05 10:57:36 2005 +0000 +++ b/lisp/emulation/cua-base.el Fri Aug 26 09:51:52 2005 +0000 @@ -575,6 +575,7 @@ ;; Current region was started using cua-set-mark. (defvar cua--explicit-region-start nil) +(make-variable-buffer-local 'cua--explicit-region-start) ;; Latest region was started using shifted movement command. (defvar cua--last-region-shifted nil) @@ -585,6 +586,7 @@ ;; status string for mode line indications (defvar cua--status-string nil) +(make-variable-buffer-local 'cua--status-string) (defvar cua--debug nil) @@ -759,14 +761,19 @@ (cons (current-buffer) (and (consp buffer-undo-list) (car buffer-undo-list)))) - (cua--deactivate))) + (cua--deactivate) + (/= start end))) (defun cua-replace-region () "Replace the active region with the character you type." (interactive) - (cua-delete-region) - (unless (eq this-original-command this-command) - (cua--fallback))) + (let ((not-empty (cua-delete-region))) + (unless (eq this-original-command this-command) + (let ((overwrite-mode + (and overwrite-mode + not-empty + (not (eq this-original-command 'self-insert-command))))) + (cua--fallback))))) (defun cua-copy-region (arg) "Copy the region to the kill ring. @@ -1359,8 +1366,6 @@ :link '(emacs-commentary-link "cua-base.el") (setq mark-even-if-inactive t) (setq highlight-nonselected-windows nil) - (make-variable-buffer-local 'cua--explicit-region-start) - (make-variable-buffer-local 'cua--status-string) (unless cua--keymaps-initalized (cua--init-keymaps)