# HG changeset patch # User Stefan Monnier # Date 1158661174 0 # Node ID f9742f561ed92afb4aa85efae4b1d1032cfb492f # Parent a5c3bc60c798853f919afb2a795b2f0e945f43e1 Include alloca.h if available. (Fkey_binding): Only use AREF after checking it's a vector. Remove unused var `window'. diff -r a5c3bc60c798 -r f9742f561ed9 src/ChangeLog --- a/src/ChangeLog Tue Sep 19 08:01:33 2006 +0000 +++ b/src/ChangeLog Tue Sep 19 10:19:34 2006 +0000 @@ -1,3 +1,9 @@ +2006-09-19 Stefan Monnier + + * keymap.c: Include alloca.h if available. + (Fkey_binding): Only use AREF after checking it's a vector. + Remove unused var `window'. + 2006-09-19 YAMAMOTO Mitsuharu * emacs.c (shut_down_emacs) [!subprocesses]: Don't set diff -r a5c3bc60c798 -r f9742f561ed9 src/keymap.c --- a/src/keymap.c Tue Sep 19 08:01:33 2006 +0000 +++ b/src/keymap.c Tue Sep 19 10:19:34 2006 +0000 @@ -23,6 +23,9 @@ #include #include +#if HAVE_ALLOCA_H +# include +#endif #include "lisp.h" #include "commands.h" #include "buffer.h" @@ -1595,15 +1598,12 @@ GCPRO2 (key, position); - if (NILP (position)) + if (NILP (position) && VECTORP (key)) { - Lisp_Object event; - /* mouse events may have a symbolic prefix indicating the - scrollbar or mode line */ - if (SYMBOLP (AREF (key, 0)) && ASIZE (key) > 1) - event = AREF (key, 1); - else - event = AREF (key, 0); + 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); /* We are not interested in locations without event data */ @@ -1672,9 +1672,7 @@ if (CONSP (position)) { - Lisp_Object string, window; - - window = POSN_WINDOW (position); + Lisp_Object string; /* For a mouse click, get the local text-property keymap of the place clicked on, rather than point. */