/* If a mouse click position is given, our variables are based on
the buffer clicked on, not the current buffer. So we may have to
switch the buffer here. */
-
+
if (CONSP (position))
{
Lisp_Object window;
-
+
window = POSN_WINDOW (position);
-
+
if (WINDOWP (window)
&& BUFFERP (XWINDOW (window)->buffer)
&& XBUFFER (XWINDOW (window)->buffer) != current_buffer)
would not be a problem here, but it is easier to keep
things the same.
*/
-
+
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
-
+
set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
}
}
- keymaps = Fcons (current_global_map, Qnil);
+ keymaps = Fcons (current_global_map, Qnil);
if (!NILP (olp))
{
/* Get the buffer local maps, possibly overriden by text or
overlay properties */
- local_map = get_local_map (pt, current_buffer, Qlocal_map);
- keymap = get_local_map (pt, current_buffer, Qkeymap);
+ local_map = get_local_map (pt, current_buffer, Qlocal_map);
+ keymap = get_local_map (pt, current_buffer, Qkeymap);
if (CONSP (position))
{
/* For a mouse click, get the local text-property keymap
of the place clicked on, rather than point. */
-
+
if (POSN_INBUFFER_P (position))
{
Lisp_Object pos;
{
local_map = get_local_map (XINT (pos),
current_buffer, Qlocal_map);
-
+
keymap = get_local_map (XINT (pos),
current_buffer, Qkeymap);
}
string displayed via the `display' property,
consider `local-map' and `keymap' properties of
that string. */
-
+
if (string = POSN_STRING (position),
(CONSP (string) && STRINGP (XCAR (string))))
{
Lisp_Object pos, map;
-
+
pos = XCDR (string);
string = XCAR (string);
if (INTEGERP (pos)
keymap = map;
}
}
-
+
}
if (!NILP (local_map))
CONSP (sequences)))
{
Lisp_Object sequence, function;
-
+
sequence = XCAR (sequences);
sequences = XCDR (sequences);
Either nil or number as value from Flookup_key
means undefined. */
- if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped),
- definition))
+ if (NILP (Fequal (shadow_lookup (keymaps, sequence, Qnil, remapped),
+ definition)))
continue;
/* If the current sequence is a command remapping with
Faset (sequence, make_number (ASIZE (sequence) - 1),
build_string ("(any string)"));
}
-
+
/* It is a true unshadowed match. Record it, unless it's already
been seen (as could happen when inheriting keymaps). */
if (NILP (Fmember (sequence, found)))
found = Fcons (sequence, found);
-
+
/* If firstonly is Qnon_ascii, then we can return the first
binding we find. If firstonly is not Qnon_ascii but not
nil, then we should return the first ascii-only binding