X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0b2014f9cb13efdd6ebc30627d88b9a7f3a42149..f95211e9a40b1c7d1beff0e15aa67450f80bd8bb:/src/keymap.c diff --git a/src/keymap.c b/src/keymap.c index 34fe1cb7a9..b69b409fc2 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -498,7 +498,7 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx, if (INTEGERP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0) { val = Faref (binding, idx); - /* `nil' has a special meaning for char-tables, so + /* nil has a special meaning for char-tables, so we use something else to record an explicitly unbound entry. */ if (NILP (val)) @@ -849,7 +849,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) if (NATNUMP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK)) { Faset (elt, idx, - /* `nil' has a special meaning for char-tables, so + /* nil has a special meaning for char-tables, so we use something else to record an explicitly unbound entry. */ NILP (def) ? Qt : def); @@ -1652,10 +1652,14 @@ specified buffer position instead of point are used. if (NILP (position) && VECTORP (key)) { - Lisp_Object event - /* mouse events may have a symbolic prefix indicating the - scrollbar or mode line */ - = AREF (key, SYMBOLP (AREF (key, 0)) && ASIZE (key) > 1 ? 1 : 0); + Lisp_Object event; + + if (ASIZE (key) == 0) + return Qnil; + + /* mouse events may have a symbolic prefix indicating the + scrollbar or mode line */ + event = AREF (key, SYMBOLP (AREF (key, 0)) && ASIZE (key) > 1 ? 1 : 0); /* We are not interested in locations without event data */ @@ -3730,8 +3734,8 @@ be preferred. */); staticpro (&Vmouse_events); Vmouse_events = listn (CONSTYPE_PURE, 9, Qmenu_bar, - intern_c_string ("tool-bar"), - intern_c_string ("header-line"), + Qtool_bar, + Qheader_line, Qmode_line, intern_c_string ("mouse-1"), intern_c_string ("mouse-2"), @@ -3739,9 +3743,6 @@ be preferred. */); intern_c_string ("mouse-4"), intern_c_string ("mouse-5")); - DEFSYM (Qsingle_key_description, "single-key-description"); - DEFSYM (Qkey_description, "key-description"); - /* Keymap used for minibuffers when doing completion. */ /* Keymap used for minibuffers when doing completion and require a match. */ DEFSYM (Qkeymapp, "keymapp");