+(defcustom motion-keys-for-shifted-motion
+ ;; meta-shift-home/end are NOT shifted motion commands.
+ '(left right up down (home) (control home) (meta control home)
+ (end) (control end) (meta control end) prior next
+ kp-left kp-right kp-up kp-down (kp-home) (control kp-home)
+ (meta control kp-home) (kp-end) (control kp-end) (meta control kp-end)
+ kp-prior kp-next)
+ "*List of keys considered motion keys for the purpose of shifted selection.
+When one of these keys is pressed along with the Shift key, and the
+command invoked moves the cursor and preserves the active region (see
+`zmacs-region-stays'), the intervening text will be added to the active
+region. See `shifted-motion-keys-select-region' for more details.
+
+Each entry should be a keysym or a list (MODIFIERS ... KEYSYM),
+i.e. zero or more modifiers followed by a keysym. When a keysym alone
+is given, a keystroke consisting of that keysym, with or without any
+modifiers, is considered a motion key. When the list form is given,
+only a keystroke with exactly those modifiers and no others (with the
+exception of the Shift key) is considered a motion key.
+
+NOTE: Currently, the keysym cannot be a non-alphabetic character key
+such as the `=/+' key. In any case, the shifted-motion paradigm does
+not make much sense with those keys. The keysym can, however, be an
+alphabetic key without problem, and you can specify the key using
+either a character or a symbol, uppercase or lowercase."
+ :type '(repeat (choice (const :tag "normal cursor-pad (\"gray\") keys"
+ :inline t
+ (left
+ right up down
+ (home) (control home) (meta control home)
+ (end) (control end) (meta control end)
+ prior next))
+ (const :tag "keypad motion keys"
+ :inline t
+ (kp-left
+ kp-right kp-up kp-down
+ (kp-home) (control kp-home)
+ (meta control kp-home)
+ (kp-end) (control kp-end)
+ (meta control kp-end)
+ kp-prior kp-next))
+ (const :tag "alphabetic motion keys"
+ :inline t
+ ((control b) (control f)
+ (control p) (control n)
+ (control a) (control e)
+ (control v) (meta v)
+ (meta b) (meta f)
+ (meta a) (meta e)
+ (meta m) ; back-to-indentation
+ (meta r) ; move-to-window-line
+ (meta control b) (meta control f)
+ (meta control p) (meta control n)
+ (meta control a) (meta control e)
+ (meta control d) ;; down-list
+ (meta control u) ;; backward-up-list
+ ))
+ symbol))
+ :group 'editing-basics)
+