comparison lisp/emulation/cua-base.el @ 86102:79412c640bdf

(cua--keymaps-initialized): Rename from `cua--keymaps-initalized'. Callers changed. (cua-highlight-region-shift-only): Doc fix. (cua-paste-pop): Fix typo in docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 15 Nov 2007 16:39:56 +0000
parents 27ff4954e2a0
children 4b0440ce239b
comparison
equal deleted inserted replaced
86101:27ff4954e2a0 86102:79412c640bdf
284 284
285 (defcustom cua-highlight-region-shift-only nil 285 (defcustom cua-highlight-region-shift-only nil
286 "*If non-nil, only highlight region if marked with S-<move>. 286 "*If non-nil, only highlight region if marked with S-<move>.
287 When this is non-nil, CUA toggles `transient-mark-mode' on when the region 287 When this is non-nil, CUA toggles `transient-mark-mode' on when the region
288 is marked using shifted movement keys, and off when the mark is cleared. 288 is marked using shifted movement keys, and off when the mark is cleared.
289 But when the mark was set using \\[cua-set-mark], transient-mark-mode 289 But when the mark was set using \\[cua-set-mark], Transient Mark mode
290 is not turned on." 290 is not turned on."
291 :type 'boolean 291 :type 'boolean
292 :group 'cua) 292 :group 'cua)
293 293
294 (defcustom cua-prefix-override-inhibit-delay 294 (defcustom cua-prefix-override-inhibit-delay
404 404
405 (defcustom cua-rectangle-mark-key [(control return)] 405 (defcustom cua-rectangle-mark-key [(control return)]
406 "Global key used to toggle the cua rectangle mark." 406 "Global key used to toggle the cua rectangle mark."
407 :set #'(lambda (symbol value) 407 :set #'(lambda (symbol value)
408 (set symbol value) 408 (set symbol value)
409 (when (and (boundp 'cua--keymaps-initalized) 409 (when (and (boundp 'cua--keymaps-initialized)
410 cua--keymaps-initalized) 410 cua--keymaps-initialized)
411 (define-key cua-global-keymap value 411 (define-key cua-global-keymap value
412 'cua-set-rectangle-mark) 412 'cua-set-rectangle-mark)
413 (when (boundp 'cua--rectangle-keymap) 413 (when (boundp 'cua--rectangle-keymap)
414 (define-key cua--rectangle-keymap value 414 (define-key cua--rectangle-keymap value
415 'cua-clear-rectangle-mark) 415 'cua-clear-rectangle-mark)
952 952
953 (defvar cua-paste-pop-count nil) 953 (defvar cua-paste-pop-count nil)
954 954
955 (defun cua-paste-pop (arg) 955 (defun cua-paste-pop (arg)
956 "Replace a just-pasted text or rectangle with a different text. 956 "Replace a just-pasted text or rectangle with a different text.
957 See `yank-pop' for details about the default behaviour. For an alternative 957 See `yank-pop' for details about the default behavior. For an alternative
958 behaviour, see `cua-paste-pop-rotate-temporarily'." 958 behavior, see `cua-paste-pop-rotate-temporarily'."
959 (interactive "P") 959 (interactive "P")
960 (cond 960 (cond
961 ((eq last-command 'cua--paste-rectangle) 961 ((eq last-command 'cua--paste-rectangle)
962 (undo) 962 (undo)
963 (yank arg)) 963 (yank arg))
1328 "Global keymap for cua-mode; users may add to this keymap.") 1328 "Global keymap for cua-mode; users may add to this keymap.")
1329 1329
1330 (defvar cua--cua-keys-keymap (make-sparse-keymap)) 1330 (defvar cua--cua-keys-keymap (make-sparse-keymap))
1331 (defvar cua--prefix-override-keymap (make-sparse-keymap)) 1331 (defvar cua--prefix-override-keymap (make-sparse-keymap))
1332 (defvar cua--prefix-repeat-keymap (make-sparse-keymap)) 1332 (defvar cua--prefix-repeat-keymap (make-sparse-keymap))
1333 (defvar cua--global-mark-keymap (make-sparse-keymap)) ; Initalized when cua-gmrk.el is loaded 1333 (defvar cua--global-mark-keymap (make-sparse-keymap)) ; Initialized when cua-gmrk.el is loaded
1334 (defvar cua--rectangle-keymap (make-sparse-keymap)) ; Initalized when cua-rect.el is loaded 1334 (defvar cua--rectangle-keymap (make-sparse-keymap)) ; Initialized when cua-rect.el is loaded
1335 (defvar cua--region-keymap (make-sparse-keymap)) 1335 (defvar cua--region-keymap (make-sparse-keymap))
1336 1336
1337 (defvar cua--ena-cua-keys-keymap nil) 1337 (defvar cua--ena-cua-keys-keymap nil)
1338 (defvar cua--ena-prefix-override-keymap nil) 1338 (defvar cua--ena-prefix-override-keymap nil)
1339 (defvar cua--ena-prefix-repeat-keymap nil) 1339 (defvar cua--ena-prefix-repeat-keymap nil)
1372 cua--last-region-shifted))) 1372 cua--last-region-shifted)))
1373 (setq cua--ena-global-mark-keymap 1373 (setq cua--ena-global-mark-keymap
1374 (and cua--global-mark-active 1374 (and cua--global-mark-active
1375 (not (window-minibuffer-p))))) 1375 (not (window-minibuffer-p)))))
1376 1376
1377 (defvar cua--keymaps-initalized nil) 1377 (defvar cua--keymaps-initialized nil)
1378 1378
1379 (defun cua--shift-control-prefix (prefix arg) 1379 (defun cua--shift-control-prefix (prefix arg)
1380 ;; handle S-C-x and S-C-c by emulating the fast double prefix function. 1380 ;; handle S-C-x and S-C-c by emulating the fast double prefix function.
1381 ;; Don't record this command 1381 ;; Don't record this command
1382 (setq this-command last-command) 1382 (setq this-command last-command)
1536 :require 'cua-base 1536 :require 'cua-base
1537 :link '(emacs-commentary-link "cua-base.el") 1537 :link '(emacs-commentary-link "cua-base.el")
1538 (setq mark-even-if-inactive t) 1538 (setq mark-even-if-inactive t)
1539 (setq highlight-nonselected-windows nil) 1539 (setq highlight-nonselected-windows nil)
1540 1540
1541 (unless cua--keymaps-initalized 1541 (unless cua--keymaps-initialized
1542 (cua--init-keymaps) 1542 (cua--init-keymaps)
1543 (setq cua--keymaps-initalized t)) 1543 (setq cua--keymaps-initialized t))
1544 1544
1545 (if cua-mode 1545 (if cua-mode
1546 (progn 1546 (progn
1547 (add-hook 'pre-command-hook 'cua--pre-command-handler) 1547 (add-hook 'pre-command-hook 'cua--pre-command-handler)
1548 (add-hook 'post-command-hook 'cua--post-command-handler) 1548 (add-hook 'post-command-hook 'cua--post-command-handler)