safe_run_hooks (hook)
Lisp_Object hook;
{
+ Lisp_Object value;
int count = specpdl_ptr - specpdl;
specbind (Qinhibit_quit, Qt);
/* We read and set the variable with functions,
in case it's buffer-local. */
- Vcommand_hook_internal = Fsymbol_value (hook);
+ value = Vcommand_hook_internal = Fsymbol_value (hook);
Fset (hook, Qnil);
call1 (Vrun_hooks, Qcommand_hook_internal);
- Fset (hook, Vcommand_hook_internal);
+ Fset (hook, value);
unbind_to (count, Qnil);
}
obj = make_lispy_switch_frame (frame);
internal_last_event_frame = frame;
}
+#endif
+#if defined(MULTI_FRAME) || defined(HAVE_MOUSE)
/* If we didn't decide to make a switch-frame event, go ahead and
return a mouse-motion event. */
if (NILP (obj))
}
}
-#ifdef MULTI_FRAME
+#if defined(MULTI_FRAME) || defined(HAVE_MOUSE)
static Lisp_Object
make_lispy_movement (frame, bar_window, part, x, y, time)
Lisp_Object x, y;
unsigned long time;
{
+#ifdef MULTI_FRAME
/* Is it a scroll bar movement? */
if (frame && ! NILP (bar_window))
{
/* Or is it an ordinary mouse movement? */
else
+#endif /* MULTI_FRAME */
{
int area;
Lisp_Object window;
Lisp_Object posn;
int column, row;
+#ifdef MULTI_FRAME
if (frame)
+#else
+ if (1)
+#endif
{
/* It's in a frame; which window on that frame? */
pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, 0, 1);
XSET (posn, Lisp_Int,
buffer_posn_from_coords (XWINDOW (window), column, row));
}
+#ifdef MULTI_FRAME
else if (frame != 0)
{
XSET (window, Lisp_Frame, frame);
posn = Qnil;
}
+#endif
else
{
window = Qnil;
}
}
-#endif /* MULTI_FRAME */
+#endif /* neither MULTI_FRAME nor HAVE_MOUSE */
/* Construct a switch frame event. */
static Lisp_Object