{
Lisp_Keymap *k;
- if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER
- | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) != 0)
+ modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3
+ | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5);
+ if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER
+ | XEMACS_MOD_HYPER | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT))
+ != 0)
abort ();
k = XKEYMAP (keymap);
int modifiers = key->modifiers;
Lisp_Keymap *k = XKEYMAP (keymap);
+ modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3
+ | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5);
assert ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META
| XEMACS_MOD_SUPER | XEMACS_MOD_HYPER
| XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) == 0);
DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, 0, 1, 0, /*
Construct and return a new keymap object.
All entries in it are nil, meaning "command undefined". The only
-difference between this function and make-keymap is that this function
+difference between this function and `make-keymap' is that this function
returns a "smaller" keymap (one that is expected to contain fewer
-entries). As keymaps dynamically resize, the distinction is not great.
+entries). As keymaps dynamically resize, this distinction is not great.
Optional argument NAME specifies a name to assign to the keymap,
as in `set-keymap-name'. This name is only a debugging convenience;
}
DEFUN ("keymapp", Fkeymapp, 1, 1, 0, /*
-Return t if ARG is a keymap object.
+Return t if OBJECT is a keymap object.
The keymap may be autoloaded first if necessary.
*/
(object))
int
event_matches_key_specifier_p (Lisp_Event *event, Lisp_Object key_specifier)
{
- Lisp_Object event2;
+ Lisp_Object event2 = Qnil;
int retval;
struct gcpro gcpro1;
XVECTOR_DATA (new_keys) [i] = XVECTOR_DATA (keys) [i];
}
else
- abort ();
+ {
+ new_keys = Qnil;
+ abort ();
+ }
if (EQ (keys, new_keys))
error_with_frob (mpc_binding,
for valid key definitions and key-sequence specifications.
A number is returned if KEYS is "too long"; that is, the leading
characters fail to be a valid sequence of prefix characters in KEYMAP.
-The number is how many characters at the front of KEYS
-it takes to reach a non-prefix command.
+The number is how many key strokes at the front of KEYS it takes to
+reach a non-prefix command.
*/
(keymap, keys, accept_default))
{
For key-presses, the order of keymaps searched is:
- the `keymap' property of any extent(s) at point;
- any applicable minor-mode maps;
- - the current-local-map of the current-buffer;
+ - the current local map of the current-buffer;
- the current global map.
For mouse-clicks, the order of keymaps searched is:
(this includes modeline extents);
- the modeline-map of the buffer corresponding to the modeline under
the mouse (if the click happened over a modeline);
- - the value of toolbar-map in the current-buffer (if the click
+ - the value of `toolbar-map' in the current-buffer (if the click
happened over a toolbar);
- - the current-local-map of the buffer under the mouse (does not
+ - the current local map of the buffer under the mouse (does not
apply to toolbar clicks);
- any applicable minor-mode maps;
- the current global map.
if (!NILP (elt_prefix))
buffer_insert_lisp_string (buf, elt_prefix);
- if (modifiers & XEMACS_MOD_META) buffer_insert_c_string (buf, "M-");
- if (modifiers & XEMACS_MOD_CONTROL) buffer_insert_c_string (buf, "C-");
- if (modifiers & XEMACS_MOD_SUPER) buffer_insert_c_string (buf, "S-");
- if (modifiers & XEMACS_MOD_HYPER) buffer_insert_c_string (buf, "H-");
- if (modifiers & XEMACS_MOD_ALT) buffer_insert_c_string (buf, "Alt-");
- if (modifiers & XEMACS_MOD_SHIFT) buffer_insert_c_string (buf, "Sh-");
+ if (modifiers & XEMACS_MOD_META)
+ buffer_insert_c_string (buf, "M-");
+ if (modifiers & XEMACS_MOD_CONTROL)
+ buffer_insert_c_string (buf, "C-");
+ if (modifiers & XEMACS_MOD_SUPER)
+ buffer_insert_c_string (buf, "S-");
+ if (modifiers & XEMACS_MOD_HYPER)
+ buffer_insert_c_string (buf, "H-");
+ if (modifiers & XEMACS_MOD_ALT)
+ buffer_insert_c_string (buf, "Alt-");
+ if (modifiers & XEMACS_MOD_SHIFT)
+ buffer_insert_c_string (buf, "Sh-");
if (SYMBOLP (keysym))
{
Lisp_Object code = Fget (keysym, Vcharacter_set_property, Qnil);