aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKim F. Storm2006-07-14 22:14:08 +0000
committerKim F. Storm2006-07-14 22:14:08 +0000
commitae6ffe9997fbfb58fed05eedadafd60370301db2 (patch)
tree377cb630b7cb2320e8e13eae70f986bf4b25bcbb /lisp
parent839929ba5306a2a5e83f0f9ca4ab54bcdb180de5 (diff)
downloademacs-ae6ffe9997fbfb58fed05eedadafd60370301db2.tar.gz
emacs-ae6ffe9997fbfb58fed05eedadafd60370301db2.zip
(cua-delete-selection, cua-toggle-set-mark): New defcustoms.
(cua-rectangle-modifier-key): Add `alt' modifier. (cua-replace-region): Don't delete if cua-delete-selection is nil. (cua-set-mark): Don't clear mark if cua-toggle-set-mark is nil. Suggested by Klaus Zeitler <kzeitler@lucent.com>.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emulation/cua-base.el19
1 files changed, 16 insertions, 3 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 7a11d6318a9..e1e88ee4399 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -305,11 +305,23 @@ If the value is nil, use a shifted prefix key to inhibit the override."
305 (const :tag "No delay" nil)) 305 (const :tag "No delay" nil))
306 :group 'cua) 306 :group 'cua)
307 307
308(defcustom cua-delete-selection t
309 "*If non-nil, typed text replaces text in the active selection."
310 :type '(choice (const :tag "Disabled" nil)
311 (other :tag "Enabled" t))
312 :group 'cua)
313
308(defcustom cua-keep-region-after-copy nil 314(defcustom cua-keep-region-after-copy nil
309 "If non-nil, don't deselect the region after copying." 315 "If non-nil, don't deselect the region after copying."
310 :type 'boolean 316 :type 'boolean
311 :group 'cua) 317 :group 'cua)
312 318
319(defcustom cua-toggle-set-mark t
320 "*In non-nil, the `cua-set-mark' command toggles the mark."
321 :type '(choice (const :tag "Disabled" nil)
322 (other :tag "Enabled" t))
323 :group 'cua)
324
313(defcustom cua-enable-register-prefix 'not-ctrl-u 325(defcustom cua-enable-register-prefix 'not-ctrl-u
314 "*If non-nil, registers are supported via numeric prefix arg. 326 "*If non-nil, registers are supported via numeric prefix arg.
315If the value is t, any numeric prefix arg in the range 0 to 9 will be 327If the value is t, any numeric prefix arg in the range 0 to 9 will be
@@ -391,7 +403,8 @@ and after the region marked by the rectangle to search."
391On non-window systems, always use the meta modifier. 403On non-window systems, always use the meta modifier.
392Must be set prior to enabling CUA." 404Must be set prior to enabling CUA."
393 :type '(choice (const :tag "Meta key" meta) 405 :type '(choice (const :tag "Meta key" meta)
394 (const :tag "Hyper key" hyper ) 406 (const :tag "Alt key" alt)
407 (const :tag "Hyper key" hyper)
395 (const :tag "Super key" super)) 408 (const :tag "Super key" super))
396 :group 'cua) 409 :group 'cua)
397 410
@@ -783,7 +796,7 @@ Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil."
783(defun cua-replace-region () 796(defun cua-replace-region ()
784 "Replace the active region with the character you type." 797 "Replace the active region with the character you type."
785 (interactive) 798 (interactive)
786 (let ((not-empty (cua-delete-region))) 799 (let ((not-empty (and cua-delete-selection (cua-delete-region))))
787 (unless (eq this-original-command this-command) 800 (unless (eq this-original-command this-command)
788 (let ((overwrite-mode 801 (let ((overwrite-mode
789 (and overwrite-mode 802 (and overwrite-mode
@@ -1001,7 +1014,7 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark."
1001 (arg 1014 (arg
1002 (setq this-command 'pop-to-mark-command) 1015 (setq this-command 'pop-to-mark-command)
1003 (pop-to-mark-command)) 1016 (pop-to-mark-command))
1004 (mark-active 1017 ((and cua-toggle-set-mark mark-active)
1005 (cua--deactivate) 1018 (cua--deactivate)
1006 (message "Mark Cleared")) 1019 (message "Mark Cleared"))
1007 (t 1020 (t