diff options
| author | Kim F. Storm | 2006-03-25 00:55:00 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-03-25 00:55:00 +0000 |
| commit | 1cb225da029ca79c4f996a3fce67ca2851c87889 (patch) | |
| tree | 52e6cf4ededb07bfe9d111c71c8f315b39a3f765 | |
| parent | 749e5af54f1a28622027fe1fe95d1672f9618f63 (diff) | |
| download | emacs-1cb225da029ca79c4f996a3fce67ca2851c87889.tar.gz emacs-1cb225da029ca79c4f996a3fce67ca2851c87889.zip | |
(cua-rectangle-mark-key): New defcustom.
(cua--init-keymaps): Use it instead of fixed C-return.
(cua-mode): Set after it.
| -rw-r--r-- | lisp/emulation/cua-base.el | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index cdc0cb7fea3..e7888dbdb0e 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -370,6 +370,22 @@ and after the region marked by the rectangle to search." | |||
| 370 | (other :tag "Enabled" t)) | 370 | (other :tag "Enabled" t)) |
| 371 | :group 'cua) | 371 | :group 'cua) |
| 372 | 372 | ||
| 373 | (defcustom cua-rectangle-mark-key [(control return)] | ||
| 374 | "Global key used to toggle the cua rectangle mark." | ||
| 375 | :set #'(lambda (symbol value) | ||
| 376 | (set symbol value) | ||
| 377 | (when (and (boundp 'cua--keymaps-initalized) | ||
| 378 | cua--keymaps-initalized) | ||
| 379 | (define-key cua-global-keymap value | ||
| 380 | 'cua-set-rectangle-mark) | ||
| 381 | (when (boundp 'cua--rectangle-keymap) | ||
| 382 | (define-key cua--rectangle-keymap value | ||
| 383 | 'cua-clear-rectangle-mark) | ||
| 384 | (define-key cua--region-keymap value | ||
| 385 | 'cua-toggle-rectangle-mark)))) | ||
| 386 | :type 'key-sequence | ||
| 387 | :group 'cua) | ||
| 388 | |||
| 373 | (defcustom cua-rectangle-modifier-key 'meta | 389 | (defcustom cua-rectangle-modifier-key 'meta |
| 374 | "*Modifier key used for rectangle commands bindings. | 390 | "*Modifier key used for rectangle commands bindings. |
| 375 | On non-window systems, always use the meta modifier. | 391 | On non-window systems, always use the meta modifier. |
| @@ -1275,7 +1291,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1275 | cua-rectangle-modifier-key | 1291 | cua-rectangle-modifier-key |
| 1276 | 'meta)) | 1292 | 'meta)) |
| 1277 | ;; C-return always toggles rectangle mark | 1293 | ;; C-return always toggles rectangle mark |
| 1278 | (define-key cua-global-keymap [(control return)] 'cua-set-rectangle-mark) | 1294 | (define-key cua-global-keymap cua-rectangle-mark-key 'cua-set-rectangle-mark) |
| 1279 | (unless (eq cua--rectangle-modifier-key 'meta) | 1295 | (unless (eq cua--rectangle-modifier-key 'meta) |
| 1280 | (cua--M/H-key cua-global-keymap ?\s 'cua-set-rectangle-mark) | 1296 | (cua--M/H-key cua-global-keymap ?\s 'cua-set-rectangle-mark) |
| 1281 | (define-key cua-global-keymap | 1297 | (define-key cua-global-keymap |
| @@ -1401,7 +1417,8 @@ only want to highlight the region when it is selected using a | |||
| 1401 | shifted movement key, set `cua-highlight-region-shift-only'." | 1417 | shifted movement key, set `cua-highlight-region-shift-only'." |
| 1402 | :global t | 1418 | :global t |
| 1403 | :group 'cua | 1419 | :group 'cua |
| 1404 | :set-after '(cua-enable-modeline-indications cua-rectangle-modifier-key) | 1420 | :set-after '(cua-enable-modeline-indications |
| 1421 | cua-rectangle-mark-key cua-rectangle-modifier-key) | ||
| 1405 | :require 'cua-base | 1422 | :require 'cua-base |
| 1406 | :link '(emacs-commentary-link "cua-base.el") | 1423 | :link '(emacs-commentary-link "cua-base.el") |
| 1407 | (setq mark-even-if-inactive t) | 1424 | (setq mark-even-if-inactive t) |