61 |
;; Eli Barzilay (eli@cs.bgu.ac.il) suggested the sexps functions and |
;; Eli Barzilay (eli@cs.bgu.ac.il) suggested the sexps functions and |
62 |
;; keybindings. |
;; keybindings. |
63 |
;; |
;; |
64 |
;; Ok, some details about the idea of pc-selection-mode: |
;; Ok, some details about the idea of PC Selection mode: |
65 |
;; |
;; |
66 |
;; o The standard keys for moving around (right, left, up, down, home, end, |
;; 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 |
;; prior, next, called "move-keys" from now on) will always de-activate |
114 |
:group 'pc-select) |
:group 'pc-select) |
115 |
|
|
116 |
(defvar pc-select-saved-settings-alist nil |
(defvar pc-select-saved-settings-alist nil |
117 |
"The values of the variables before `pc-selection-mode' was toggled on. |
"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 |
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 |
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 |
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.") |
restored to their original values when PC Selection mode is toggled off.") |
122 |
|
|
123 |
(defvar pc-select-map nil |
(defvar pc-select-map nil |
124 |
"The keymap used as the global map when `pc-selection-mode' is on." ) |
"The keymap used as the global map when PC Selection mode is on." ) |
125 |
|
|
126 |
(defvar pc-select-saved-global-map nil |
(defvar pc-select-saved-global-map nil |
127 |
"The global map that was in effect when `pc-selection-mode' was toggled on.") |
"The global map that was in effect when PC Selection mode was toggled on.") |
128 |
|
|
129 |
(defvar pc-select-key-bindings-alist nil |
(defvar pc-select-key-bindings-alist nil |
130 |
"This alist holds all the key bindings `pc-selection-mode' sets.") |
"This alist holds all the key bindings PC Selection mode sets.") |
131 |
|
|
132 |
(defvar pc-select-default-key-bindings nil |
(defvar pc-select-default-key-bindings nil |
133 |
"These key bindings always get set by `pc-selection-mode'.") |
"These key bindings always get set by PC Selection mode.") |
134 |
|
|
135 |
(unless pc-select-default-key-bindings |
(unless pc-select-default-key-bindings |
136 |
(let ((lst |
(let ((lst |
250 |
(defvar pc-select-old-M-delete-binding nil |
(defvar pc-select-old-M-delete-binding nil |
251 |
"Holds the old mapping of [M-delete] in the `function-key-map'. |
"Holds the old mapping of [M-delete] in the `function-key-map'. |
252 |
This variable holds the value associated with [M-delete] in the |
This variable holds the value associated with [M-delete] in the |
253 |
`function-key-map' before `pc-selection-mode' had changed that |
`function-key-map' before PC Selection mode had changed that |
254 |
association.") |
association.") |
255 |
|
|
256 |
;;;; |
;;;; |
842 |
S-M-LEFT and S-M-RIGHT move back or forward one word or sexp, leaving the mark |
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 |
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 |
variable `pc-select-meta-moves-sexps' after loading pc-select.el but before |
845 |
turning `pc-selection-mode' on. |
turning PC Selection mode on. |
846 |
|
|
847 |
C-DOWN and C-UP move back or forward a paragraph, disabling the mark. |
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. |
S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind. |
864 |
|
|
865 |
In addition, certain other PC bindings are imitated (to avoid this, set |
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 |
the variable `pc-select-selection-keys-only' to t after loading pc-select.el |
867 |
but before calling `pc-selection-mode'): |
but before calling PC Selection mode): |
868 |
|
|
869 |
F6 other-window |
F6 other-window |
870 |
DELETE delete-char |
DELETE delete-char |
974 |
Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, |
Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, |
975 |
and cursor movement commands. |
and cursor movement commands. |
976 |
This mode enables Delete Selection mode and Transient Mark mode. |
This mode enables Delete Selection mode and Transient Mark mode. |
977 |
You must modify via \\[customize] for this variable to have an effect." |
Setting this variable directly does not take effect; |
978 |
|
you must modify it using \\[customize] or \\[pc-selection-mode]." |
979 |
:set (lambda (symbol value) |
:set (lambda (symbol value) |
980 |
(pc-selection-mode (if value 1 -1))) |
(pc-selection-mode (if value 1 -1))) |
981 |
:initialize 'custom-initialize-default |
:initialize 'custom-initialize-default |