comparison lisp/emulation/pc-select.el @ 89943:4c90ffeb71c5

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
author Miles Bader <miles@gnu.org>
date Mon, 28 Jun 2004 07:56:49 +0000
parents 68c22ea6027c d62a2b6e582e
children f042e7c0fe20
comparison
equal deleted inserted replaced
89942:9cb747ae49af 89943:4c90ffeb71c5
59 ;; Dan Nicolaescu <done@ece.arizona.ro> suggested suppressing the 59 ;; Dan Nicolaescu <done@ece.arizona.ro> suggested suppressing the
60 ;; scroll-up/scroll-down error. 60 ;; scroll-up/scroll-down error.
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
68 ;; the mark. 68 ;; the mark.
69 ;; o If you press "Shift" together with the "move-keys", the region 69 ;; o If you press "Shift" together with the "move-keys", the region
112 "The hook to run when pc-selection-mode is toggled." 112 "The hook to run when pc-selection-mode is toggled."
113 :type 'hook 113 :type 'hook
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
137 ;; This is to avoid confusion with the delete-selection-mode 137 ;; This is to avoid confusion with the delete-selection-mode
138 ;; On simple displays you cant see that a region is active and 138 ;; On simple displays you cant see that a region is active and
248 `pc-select-selection-keys-only' is nil.") 248 `pc-select-selection-keys-only' is nil.")
249 249
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 ;;;;
257 ;; misc 257 ;; misc
258 ;;;; 258 ;;;;
840 840
841 M-LEFT and M-RIGHT move back or forward one word or sexp, disabling the mark. 841 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.
849 849
850 HOME moves to beginning of line, disabling the mark. 850 HOME moves to beginning of line, disabling the mark.
862 S-INSERT yanks text from the kill ring (`yank'). 862 S-INSERT yanks text from the kill ring (`yank').
863 C-INSERT copies the region into the kill ring (`copy-region-as-kill'). 863 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
871 C-DELETE kill-line 871 C-DELETE kill-line
872 M-DELETE kill-word 872 M-DELETE kill-word
972 (defcustom pc-selection-mode nil 972 (defcustom pc-selection-mode nil
973 "Toggle PC Selection mode. 973 "Toggle 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
981 :type 'boolean 982 :type 'boolean
982 :group 'pc-select 983 :group 'pc-select