diff options
| author | Miles Bader | 2004-06-28 07:56:49 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-06-28 07:56:49 +0000 |
| commit | 327719ee8a3fcdb36ed6acaf6d8cb5fbdf0bd801 (patch) | |
| tree | 21de188e13b5e41a79bb50040933072ae0235217 /lisp/emulation | |
| parent | 852f73b7fa7b71910282eacb6263b3ecfd4ee783 (diff) | |
| parent | 376de73927383d6062483db10b8a82448505f52b (diff) | |
| download | emacs-327719ee8a3fcdb36ed6acaf6d8cb5fbdf0bd801.tar.gz emacs-327719ee8a3fcdb36ed6acaf6d8cb5fbdf0bd801.zip | |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-15
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-218
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-220
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-221
Restore deleted tagline in etc/TUTORIAL.ru
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-222
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-228
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-229
Remove TeX output files from the archive
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248
src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-256
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-258
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-263
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-264
Update from CVS: lispref/display.texi: emacs -> Emacs.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-265
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275
Update from CVS: man/makefile.w32-in: Revert last change
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296
Allow restarting an existing debugger session that's exited
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328
Update from CVS: src/.gdbinit (xsymbol): Fix last change.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-344
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-345
Tweak source regexps so that building in place won't cause problems
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-346
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-351
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-352
Update from CVS: lisp/flymake.el: New file.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-353
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-361
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-362
Support " [...]" style defaults in minibuffer-electric-default-mode
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-363
(read-number): Use canonical format for default in prompt.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-364
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-367
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-368
Improve display-supports-face-attributes-p on non-ttys
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-369
Rewrite face-differs-from-default-p
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-370
Move `display-supports-face-attributes-p' entirely into C code
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-371
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-372
Simplify face-differs-from-default-p; don't consider :stipple.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-373
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-374
(tty_supports_face_attributes_p): Ensure attributes differ from default
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-375
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-376
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377
(Fdisplay_supports_face_attributes_p): Work around bootstrapping problem
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-378
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-380
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-381
Face merging cleanups
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-382
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-384
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-385
src/xfaces.c (push_named_merge_point): Return 0 if a cycle is detected
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-386
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-395
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-396
Tweak arch tagging to make build/install-in-place less annoying
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Work around vc-arch problems when building eshell
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-398
Tweak permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-399
Tweak directory permissions
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-400
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-401
More build-in-place tweaking of arch tagging
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-402
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-403
Yet more build-in-place tweaking of arch tagging
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-404
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410
Make sure image types are initialized for lookup too
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416
Update from CVS
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/cua-base.el | 181 | ||||
| -rw-r--r-- | lisp/emulation/cua-rect.el | 25 | ||||
| -rw-r--r-- | lisp/emulation/pc-select.el | 27 |
3 files changed, 185 insertions, 48 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 24f95ec21ea..51b47b104d0 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cua-base.el --- emulate CUA key bindings | 1 | ;;; cua-base.el --- emulate CUA key bindings |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997,98,99,200,01,02,03 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997,98,99,200,01,02,03,04 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Kim F. Storm <storm@cua.dk> | 5 | ;; Author: Kim F. Storm <storm@cua.dk> |
| 6 | ;; Keywords: keyboard emulation convenience cua | 6 | ;; Keywords: keyboard emulation convenience cua |
| @@ -413,29 +413,101 @@ Can be toggled by [M-p] while the rectangle is active," | |||
| 413 | "red") | 413 | "red") |
| 414 | "Normal (non-overwrite) cursor color. | 414 | "Normal (non-overwrite) cursor color. |
| 415 | Also used to indicate that rectangle padding is not in effect. | 415 | Also used to indicate that rectangle padding is not in effect. |
| 416 | Default is to load cursor color from initial or default frame parameters." | 416 | Default is to load cursor color from initial or default frame parameters. |
| 417 | |||
| 418 | If the value is a COLOR name, then only the `cursor-color' attribute will be | ||
| 419 | affected. If the value is a cursor TYPE (one of: box, hollow, bar, or hbar), | ||
| 420 | then only the `cursor-type' property will be affected. If the value is | ||
| 421 | a cons (TYPE . COLOR), then both properties are affected." | ||
| 417 | :initialize 'custom-initialize-default | 422 | :initialize 'custom-initialize-default |
| 418 | :type 'color | 423 | :type '(choice |
| 424 | (color :tag "Color") | ||
| 425 | (choice :tag "Type" | ||
| 426 | (const :tag "Filled box" box) | ||
| 427 | (const :tag "Vertical bar" bar) | ||
| 428 | (const :tag "Horisontal bar" hbar) | ||
| 429 | (const :tag "Hollow box" hollow)) | ||
| 430 | (cons :tag "Color and Type" | ||
| 431 | (choice :tag "Type" | ||
| 432 | (const :tag "Filled box" box) | ||
| 433 | (const :tag "Vertical bar" bar) | ||
| 434 | (const :tag "Horisontal bar" hbar) | ||
| 435 | (const :tag "Hollow box" hollow)) | ||
| 436 | (color :tag "Color"))) | ||
| 419 | :group 'cua) | 437 | :group 'cua) |
| 420 | 438 | ||
| 421 | (defcustom cua-read-only-cursor-color "darkgreen" | 439 | (defcustom cua-read-only-cursor-color "darkgreen" |
| 422 | "*Cursor color used in read-only buffers, if non-nil. | 440 | "*Cursor color used in read-only buffers, if non-nil. |
| 423 | Only used when `cua-enable-cursor-indications' is non-nil." | 441 | Only used when `cua-enable-cursor-indications' is non-nil. |
| 424 | :type 'color | 442 | |
| 443 | If the value is a COLOR name, then only the `cursor-color' attribute will be | ||
| 444 | affected. If the value is a cursor TYPE (one of: box, hollow, bar, or hbar), | ||
| 445 | then only the `cursor-type' property will be affected. If the value is | ||
| 446 | a cons (TYPE . COLOR), then both properties are affected." | ||
| 447 | :type '(choice | ||
| 448 | (color :tag "Color") | ||
| 449 | (choice :tag "Type" | ||
| 450 | (const :tag "Filled box" box) | ||
| 451 | (const :tag "Vertical bar" bar) | ||
| 452 | (const :tag "Horisontal bar" hbar) | ||
| 453 | (const :tag "Hollow box" hollow)) | ||
| 454 | (cons :tag "Color and Type" | ||
| 455 | (choice :tag "Type" | ||
| 456 | (const :tag "Filled box" box) | ||
| 457 | (const :tag "Vertical bar" bar) | ||
| 458 | (const :tag "Horisontal bar" hbar) | ||
| 459 | (const :tag "Hollow box" hollow)) | ||
| 460 | (color :tag "Color"))) | ||
| 425 | :group 'cua) | 461 | :group 'cua) |
| 426 | 462 | ||
| 427 | (defcustom cua-overwrite-cursor-color "yellow" | 463 | (defcustom cua-overwrite-cursor-color "yellow" |
| 428 | "*Cursor color used when overwrite mode is set, if non-nil. | 464 | "*Cursor color used when overwrite mode is set, if non-nil. |
| 429 | Also used to indicate that rectangle padding is in effect. | 465 | Also used to indicate that rectangle padding is in effect. |
| 430 | Only used when `cua-enable-cursor-indications' is non-nil." | 466 | Only used when `cua-enable-cursor-indications' is non-nil. |
| 431 | :type 'color | 467 | |
| 468 | If the value is a COLOR name, then only the `cursor-color' attribute will be | ||
| 469 | affected. If the value is a cursor TYPE (one of: box, hollow, bar, or hbar), | ||
| 470 | then only the `cursor-type' property will be affected. If the value is | ||
| 471 | a cons (TYPE . COLOR), then both properties are affected." | ||
| 472 | :type '(choice | ||
| 473 | (color :tag "Color") | ||
| 474 | (choice :tag "Type" | ||
| 475 | (const :tag "Filled box" box) | ||
| 476 | (const :tag "Vertical bar" bar) | ||
| 477 | (const :tag "Horisontal bar" hbar) | ||
| 478 | (const :tag "Hollow box" hollow)) | ||
| 479 | (cons :tag "Color and Type" | ||
| 480 | (choice :tag "Type" | ||
| 481 | (const :tag "Filled box" box) | ||
| 482 | (const :tag "Vertical bar" bar) | ||
| 483 | (const :tag "Horisontal bar" hbar) | ||
| 484 | (const :tag "Hollow box" hollow)) | ||
| 485 | (color :tag "Color"))) | ||
| 432 | :group 'cua) | 486 | :group 'cua) |
| 433 | 487 | ||
| 434 | (defcustom cua-global-mark-cursor-color "cyan" | 488 | (defcustom cua-global-mark-cursor-color "cyan" |
| 435 | "*Indication for active global mark. | 489 | "*Indication for active global mark. |
| 436 | Will change cursor color to specified color if string. | 490 | Will change cursor color to specified color if string. |
| 437 | Only used when `cua-enable-cursor-indications' is non-nil." | 491 | Only used when `cua-enable-cursor-indications' is non-nil. |
| 438 | :type 'color | 492 | |
| 493 | If the value is a COLOR name, then only the `cursor-color' attribute will be | ||
| 494 | affected. If the value is a cursor TYPE (one of: box, hollow, bar, or hbar), | ||
| 495 | then only the `cursor-type' property will be affected. If the value is | ||
| 496 | a cons (TYPE . COLOR), then both properties are affected." | ||
| 497 | :type '(choice | ||
| 498 | (color :tag "Color") | ||
| 499 | (choice :tag "Type" | ||
| 500 | (const :tag "Filled box" box) | ||
| 501 | (const :tag "Vertical bar" bar) | ||
| 502 | (const :tag "Horisontal bar" hbar) | ||
| 503 | (const :tag "Hollow box" hollow)) | ||
| 504 | (cons :tag "Color and Type" | ||
| 505 | (choice :tag "Type" | ||
| 506 | (const :tag "Filled box" box) | ||
| 507 | (const :tag "Vertical bar" bar) | ||
| 508 | (const :tag "Horisontal bar" hbar) | ||
| 509 | (const :tag "Hollow box" hollow)) | ||
| 510 | (color :tag "Color"))) | ||
| 439 | :group 'cua) | 511 | :group 'cua) |
| 440 | 512 | ||
| 441 | 513 | ||
| @@ -893,7 +965,7 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark." | |||
| 893 | forward-word backward-word | 965 | forward-word backward-word |
| 894 | end-of-line beginning-of-line | 966 | end-of-line beginning-of-line |
| 895 | end-of-buffer beginning-of-buffer | 967 | end-of-buffer beginning-of-buffer |
| 896 | scroll-up scroll-down | 968 | scroll-up scroll-down cua-scroll-up cua-scroll-down |
| 897 | forward-sentence backward-sentence | 969 | forward-sentence backward-sentence |
| 898 | forward-paragraph backward-paragraph) | 970 | forward-paragraph backward-paragraph) |
| 899 | "List of standard movement commands. | 971 | "List of standard movement commands. |
| @@ -903,26 +975,72 @@ Extra commands should be added to `cua-movement-commands'") | |||
| 903 | "User may add additional movement commands to this list.") | 975 | "User may add additional movement commands to this list.") |
| 904 | 976 | ||
| 905 | 977 | ||
| 978 | ;;; Scrolling commands which does not signal errors at top/bottom | ||
| 979 | ;;; of buffer at first key-press (instead moves to top/bottom | ||
| 980 | ;;; of buffer). | ||
| 981 | |||
| 982 | (defun cua-scroll-up (&optional arg) | ||
| 983 | "Scroll text of current window upward ARG lines; or near full screen if no ARG. | ||
| 984 | If window cannot be scrolled further, move cursor to bottom line instead. | ||
| 985 | A near full screen is `next-screen-context-lines' less than a full screen. | ||
| 986 | Negative ARG means scroll downward. | ||
| 987 | If ARG is the atom `-', scroll downward by nearly full screen." | ||
| 988 | (interactive "P") | ||
| 989 | (cond | ||
| 990 | ((eq arg '-) (cua-scroll-down nil)) | ||
| 991 | ((< (prefix-numeric-value arg) 0) | ||
| 992 | (cua-scroll-down (- (prefix-numeric-value arg)))) | ||
| 993 | ((eobp) | ||
| 994 | (scroll-up arg)) ; signal error | ||
| 995 | (t | ||
| 996 | (condition-case nil | ||
| 997 | (scroll-up arg) | ||
| 998 | (end-of-buffer (goto-char (point-max))))))) | ||
| 999 | |||
| 1000 | (defun cua-scroll-down (&optional arg) | ||
| 1001 | "Scroll text of current window downward ARG lines; or near full screen if no ARG. | ||
| 1002 | If window cannot be scrolled further, move cursor to top line instead. | ||
| 1003 | A near full screen is `next-screen-context-lines' less than a full screen. | ||
| 1004 | Negative ARG means scroll upward. | ||
| 1005 | If ARG is the atom `-', scroll upward by nearly full screen." | ||
| 1006 | (interactive "P") | ||
| 1007 | (cond | ||
| 1008 | ((eq arg '-) (cua-scroll-up nil)) | ||
| 1009 | ((< (prefix-numeric-value arg) 0) | ||
| 1010 | (cua-scroll-up (- (prefix-numeric-value arg)))) | ||
| 1011 | ((bobp) | ||
| 1012 | (scroll-down arg)) ; signal error | ||
| 1013 | (t | ||
| 1014 | (condition-case nil | ||
| 1015 | (scroll-down arg) | ||
| 1016 | (beginning-of-buffer (goto-char (point-min))))))) | ||
| 1017 | |||
| 906 | ;;; Cursor indications | 1018 | ;;; Cursor indications |
| 907 | 1019 | ||
| 908 | (defun cua--update-indications () | 1020 | (defun cua--update-indications () |
| 909 | (let ((cursor | 1021 | (let* ((cursor |
| 910 | (cond | 1022 | (cond |
| 911 | ((and cua--global-mark-active | 1023 | ((and cua--global-mark-active |
| 912 | (stringp cua-global-mark-cursor-color)) | 1024 | cua-global-mark-cursor-color) |
| 913 | cua-global-mark-cursor-color) | 1025 | cua-global-mark-cursor-color) |
| 914 | ((and buffer-read-only | 1026 | ((and buffer-read-only |
| 915 | (stringp cua-read-only-cursor-color)) | 1027 | cua-read-only-cursor-color) |
| 916 | cua-read-only-cursor-color) | 1028 | cua-read-only-cursor-color) |
| 917 | ((and (stringp cua-overwrite-cursor-color) | 1029 | ((and cua-overwrite-cursor-color |
| 918 | (or overwrite-mode | 1030 | (or overwrite-mode |
| 919 | (and cua--rectangle (cua--rectangle-padding)))) | 1031 | (and cua--rectangle (cua--rectangle-padding)))) |
| 920 | cua-overwrite-cursor-color) | 1032 | cua-overwrite-cursor-color) |
| 921 | (t cua-normal-cursor-color)))) | 1033 | (t cua-normal-cursor-color))) |
| 922 | (if (and cursor | 1034 | (color (if (consp cursor) (cdr cursor) cursor)) |
| 923 | (not (equal cursor (frame-parameter nil 'cursor-color)))) | 1035 | (type (if (consp cursor) (car cursor) cursor))) |
| 924 | (set-cursor-color cursor)) | 1036 | (if (and color |
| 925 | cursor)) | 1037 | (stringp color) |
| 1038 | (not (equal color (frame-parameter nil 'cursor-color)))) | ||
| 1039 | (set-cursor-color color)) | ||
| 1040 | (if (and type | ||
| 1041 | (symbolp type) | ||
| 1042 | (not (eq type default-cursor-type))) | ||
| 1043 | (setq default-cursor-type type)))) | ||
| 926 | 1044 | ||
| 927 | 1045 | ||
| 928 | ;;; Pre-command hook | 1046 | ;;; Pre-command hook |
| @@ -1108,6 +1226,10 @@ Extra commands should be added to `cua-movement-commands'") | |||
| 1108 | (define-key cua-global-keymap [remap undo] 'cua-undo) | 1226 | (define-key cua-global-keymap [remap undo] 'cua-undo) |
| 1109 | (define-key cua-global-keymap [remap advertised-undo] 'cua-undo) | 1227 | (define-key cua-global-keymap [remap advertised-undo] 'cua-undo) |
| 1110 | 1228 | ||
| 1229 | ;; scrolling | ||
| 1230 | (define-key cua-global-keymap [remap scroll-up] 'cua-scroll-up) | ||
| 1231 | (define-key cua-global-keymap [remap scroll-down] 'cua-scroll-down) | ||
| 1232 | |||
| 1111 | (define-key cua--cua-keys-keymap [(control x) timeout] 'kill-region) | 1233 | (define-key cua--cua-keys-keymap [(control x) timeout] 'kill-region) |
| 1112 | (define-key cua--cua-keys-keymap [(control c) timeout] 'copy-region-as-kill) | 1234 | (define-key cua--cua-keys-keymap [(control c) timeout] 'copy-region-as-kill) |
| 1113 | (define-key cua--cua-keys-keymap [(control z)] 'undo) | 1235 | (define-key cua--cua-keys-keymap [(control z)] 'undo) |
| @@ -1189,7 +1311,9 @@ paste (in addition to the normal emacs bindings)." | |||
| 1189 | (add-hook 'post-command-hook 'cua--post-command-handler) | 1311 | (add-hook 'post-command-hook 'cua--post-command-handler) |
| 1190 | (if (and cua-enable-modeline-indications (not (assoc 'cua-mode minor-mode-alist))) | 1312 | (if (and cua-enable-modeline-indications (not (assoc 'cua-mode minor-mode-alist))) |
| 1191 | (setq minor-mode-alist (cons '(cua-mode cua--status-string) minor-mode-alist))) | 1313 | (setq minor-mode-alist (cons '(cua-mode cua--status-string) minor-mode-alist))) |
| 1192 | ) | 1314 | (if cua-enable-cursor-indications |
| 1315 | (cua--update-indications))) | ||
| 1316 | |||
| 1193 | (remove-hook 'pre-command-hook 'cua--pre-command-handler) | 1317 | (remove-hook 'pre-command-hook 'cua--pre-command-handler) |
| 1194 | (remove-hook 'post-command-hook 'cua--post-command-handler)) | 1318 | (remove-hook 'post-command-hook 'cua--post-command-handler)) |
| 1195 | 1319 | ||
| @@ -1212,6 +1336,7 @@ paste (in addition to the normal emacs bindings)." | |||
| 1212 | (delete-selection-mode -1)) | 1336 | (delete-selection-mode -1)) |
| 1213 | (if (and (boundp 'pc-selection-mode) pc-selection-mode) | 1337 | (if (and (boundp 'pc-selection-mode) pc-selection-mode) |
| 1214 | (pc-selection-mode -1)) | 1338 | (pc-selection-mode -1)) |
| 1339 | (cua--deactivate) | ||
| 1215 | (setq transient-mark-mode (and cua-mode | 1340 | (setq transient-mark-mode (and cua-mode |
| 1216 | (if cua-highlight-region-shift-only | 1341 | (if cua-highlight-region-shift-only |
| 1217 | (not cua--explicit-region-start) | 1342 | (not cua--explicit-region-start) |
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index fefd7001029..965fe63bced 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; cua-rect.el --- CUA unified rectangle support | 1 | ;;; cua-rect.el --- CUA unified rectangle support |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997-2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997-2002, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Kim F. Storm <storm@cua.dk> | 5 | ;; Author: Kim F. Storm <storm@cua.dk> |
| 6 | ;; Keywords: keyboard emulations convenience CUA | 6 | ;; Keywords: keyboard emulations convenience CUA |
| @@ -1057,19 +1057,30 @@ The numbers are formatted according to the FORMAT string." | |||
| 1057 | (insert (format fmt first)) | 1057 | (insert (format fmt first)) |
| 1058 | (setq first (+ first incr))))) | 1058 | (setq first (+ first incr))))) |
| 1059 | 1059 | ||
| 1060 | (defmacro cua--convert-rectangle-as (command) | ||
| 1061 | `(cua--rectangle-operation 'clear nil nil nil | ||
| 1062 | '(lambda (s e l r) | ||
| 1063 | (,command s e)))) | ||
| 1064 | |||
| 1060 | (defun cua-upcase-rectangle () | 1065 | (defun cua-upcase-rectangle () |
| 1061 | "Convert the rectangle to upper case." | 1066 | "Convert the rectangle to upper case." |
| 1062 | (interactive) | 1067 | (interactive) |
| 1063 | (cua--rectangle-operation 'clear nil nil nil | 1068 | (cua--convert-rectangle-as upcase-region)) |
| 1064 | '(lambda (s e l r) | ||
| 1065 | (upcase-region s e)))) | ||
| 1066 | 1069 | ||
| 1067 | (defun cua-downcase-rectangle () | 1070 | (defun cua-downcase-rectangle () |
| 1068 | "Convert the rectangle to lower case." | 1071 | "Convert the rectangle to lower case." |
| 1069 | (interactive) | 1072 | (interactive) |
| 1070 | (cua--rectangle-operation 'clear nil nil nil | 1073 | (cua--convert-rectangle-as downcase-region)) |
| 1071 | '(lambda (s e l r) | 1074 | |
| 1072 | (downcase-region s e)))) | 1075 | (defun cua-upcase-initials-rectangle () |
| 1076 | "Convert the rectangle initials to upper case." | ||
| 1077 | (interactive) | ||
| 1078 | (cua--convert-rectangle-as upcase-initials-region)) | ||
| 1079 | |||
| 1080 | (defun cua-capitalize-rectangle () | ||
| 1081 | "Convert the rectangle to proper case." | ||
| 1082 | (interactive) | ||
| 1083 | (cua--convert-rectangle-as capitalize-region)) | ||
| 1073 | 1084 | ||
| 1074 | 1085 | ||
| 1075 | ;;; Replace/rearrange text in current rectangle | 1086 | ;;; Replace/rearrange text in current rectangle |
diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index c7ea973467f..188e335687c 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | ;; Eli Barzilay (eli@cs.bgu.ac.il) suggested the sexps functions and | 61 | ;; Eli Barzilay (eli@cs.bgu.ac.il) suggested the sexps functions and |
| 62 | ;; keybindings. | 62 | ;; keybindings. |
| 63 | ;; | 63 | ;; |
| 64 | ;; Ok, some details about the idea of pc-selection-mode: | 64 | ;; Ok, some details about the idea of PC Selection mode: |
| 65 | ;; | 65 | ;; |
| 66 | ;; o The standard keys for moving around (right, left, up, down, home, end, | 66 | ;; o The standard keys for moving around (right, left, up, down, home, end, |
| 67 | ;; prior, next, called "move-keys" from now on) will always de-activate | 67 | ;; prior, next, called "move-keys" from now on) will always de-activate |
| @@ -114,23 +114,23 @@ This gives mostly Emacs-like behaviour with only the selection keys enabled." | |||
| 114 | :group 'pc-select) | 114 | :group 'pc-select) |
| 115 | 115 | ||
| 116 | (defvar pc-select-saved-settings-alist nil | 116 | (defvar pc-select-saved-settings-alist nil |
| 117 | "The values of the variables before `pc-selection-mode' was toggled on. | 117 | "The values of the variables before PC Selection mode was toggled on. |
| 118 | When `pc-selection-mode' is toggled on, it sets quite a few variables | 118 | When PC Selection mode is toggled on, it sets quite a few variables |
| 119 | for its own purposes. This alist holds the original values of the | 119 | for its own purposes. This alist holds the original values of the |
| 120 | variables `pc-selection-mode' had set, so that these variables can be | 120 | variables PC Selection mode had set, so that these variables can be |
| 121 | restored to their original values when `pc-selection-mode' is toggled off.") | 121 | restored to their original values when PC Selection mode is toggled off.") |
| 122 | 122 | ||
| 123 | (defvar pc-select-map nil | 123 | (defvar pc-select-map nil |
| 124 | "The keymap used as the global map when `pc-selection-mode' is on." ) | 124 | "The keymap used as the global map when PC Selection mode is on." ) |
| 125 | 125 | ||
| 126 | (defvar pc-select-saved-global-map nil | 126 | (defvar pc-select-saved-global-map nil |
| 127 | "The global map that was in effect when `pc-selection-mode' was toggled on.") | 127 | "The global map that was in effect when PC Selection mode was toggled on.") |
| 128 | 128 | ||
| 129 | (defvar pc-select-key-bindings-alist nil | 129 | (defvar pc-select-key-bindings-alist nil |
| 130 | "This alist holds all the key bindings `pc-selection-mode' sets.") | 130 | "This alist holds all the key bindings PC Selection mode sets.") |
| 131 | 131 | ||
| 132 | (defvar pc-select-default-key-bindings nil | 132 | (defvar pc-select-default-key-bindings nil |
| 133 | "These key bindings always get set by `pc-selection-mode'.") | 133 | "These key bindings always get set by PC Selection mode.") |
| 134 | 134 | ||
| 135 | (unless pc-select-default-key-bindings | 135 | (unless pc-select-default-key-bindings |
| 136 | (let ((lst | 136 | (let ((lst |
| @@ -250,7 +250,7 @@ These key bindings get installed when running in a tty, but only if | |||
| 250 | (defvar pc-select-old-M-delete-binding nil | 250 | (defvar pc-select-old-M-delete-binding nil |
| 251 | "Holds the old mapping of [M-delete] in the `function-key-map'. | 251 | "Holds the old mapping of [M-delete] in the `function-key-map'. |
| 252 | This variable holds the value associated with [M-delete] in the | 252 | This variable holds the value associated with [M-delete] in the |
| 253 | `function-key-map' before `pc-selection-mode' had changed that | 253 | `function-key-map' before PC Selection mode had changed that |
| 254 | association.") | 254 | association.") |
| 255 | 255 | ||
| 256 | ;;;; | 256 | ;;;; |
| @@ -842,7 +842,7 @@ M-LEFT and M-RIGHT move back or forward one word or sexp, disabling the mark. | |||
| 842 | S-M-LEFT and S-M-RIGHT move back or forward one word or sexp, leaving the mark | 842 | S-M-LEFT and S-M-RIGHT move back or forward one word or sexp, leaving the mark |
| 843 | behind. To control whether these keys move word-wise or sexp-wise set the | 843 | behind. To control whether these keys move word-wise or sexp-wise set the |
| 844 | variable `pc-select-meta-moves-sexps' after loading pc-select.el but before | 844 | variable `pc-select-meta-moves-sexps' after loading pc-select.el but before |
| 845 | turning `pc-selection-mode' on. | 845 | turning PC Selection mode on. |
| 846 | 846 | ||
| 847 | C-DOWN and C-UP move back or forward a paragraph, disabling the mark. | 847 | C-DOWN and C-UP move back or forward a paragraph, disabling the mark. |
| 848 | S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind. | 848 | S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind. |
| @@ -864,7 +864,7 @@ C-INSERT copies the region into the kill ring (`copy-region-as-kill'). | |||
| 864 | 864 | ||
| 865 | In addition, certain other PC bindings are imitated (to avoid this, set | 865 | In addition, certain other PC bindings are imitated (to avoid this, set |
| 866 | the variable `pc-select-selection-keys-only' to t after loading pc-select.el | 866 | the variable `pc-select-selection-keys-only' to t after loading pc-select.el |
| 867 | but before calling `pc-selection-mode'): | 867 | but before calling PC Selection mode): |
| 868 | 868 | ||
| 869 | F6 other-window | 869 | F6 other-window |
| 870 | DELETE delete-char | 870 | DELETE delete-char |
| @@ -974,7 +974,8 @@ but before calling `pc-selection-mode'): | |||
| 974 | Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, | 974 | Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, |
| 975 | and cursor movement commands. | 975 | and cursor movement commands. |
| 976 | This mode enables Delete Selection mode and Transient Mark mode. | 976 | This mode enables Delete Selection mode and Transient Mark mode. |
| 977 | You must modify via \\[customize] for this variable to have an effect." | 977 | Setting this variable directly does not take effect; |
| 978 | you must modify it using \\[customize] or \\[pc-selection-mode]." | ||
| 978 | :set (lambda (symbol value) | 979 | :set (lambda (symbol value) |
| 979 | (pc-selection-mode (if value 1 -1))) | 980 | (pc-selection-mode (if value 1 -1))) |
| 980 | :initialize 'custom-initialize-default | 981 | :initialize 'custom-initialize-default |