Lisp_Object Fthis_command_keys ();
Lisp_Object Qextended_command_history;
+Lisp_Object Qpolling_period;
+
/* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt
happens. */
EMACS_TIME *input_available_clear_time;
immediate_echo = 1;
for (i = 0; i < this_command_key_count; i++)
- echo_char (XVECTOR (this_command_keys)->contents[i]);
+ {
+ Lisp_Object c;
+ c = XVECTOR (this_command_keys)->contents[i];
+ if (! (EVENT_HAS_PARAMETERS (c)
+ && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
+ echo_char (c);
+ }
echo_dash ();
}
SET_PT (PT - 1);
lose = FETCH_CHAR (PT);
if ((dp
- ? (XTYPE (DISP_CHAR_VECTOR (dp, lose)) != Lisp_Vector
+ ? (VECTORP (DISP_CHAR_VECTOR (dp, lose))
&& XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1)
: (lose >= 0x20 && lose < 0x7f))
&& (XFASTINT (XWINDOW (selected_window)->last_modified)
poll_suppress_count = count;
#endif
}
+
+/* Bind polling_period to a value at least N.
+ But don't decrease it. */
+
+bind_polling_period (n)
+ int n;
+{
+#ifdef POLL_FOR_INPUT
+ int new = polling_period;
+
+ if (n > new)
+ new = n;
+
+ stop_polling ();
+ specbind (Qpolling_period, make_number (new));
+ /* Start a new alarm with the new period. */
+ start_polling ();
+#endif
+}
\f
/* Applying the control modifier to CHARACTER. */
int
start_polling ();
- echo_area_glyphs = 0;
+ /* Don't wipe the echo area for a trivial event. */
+ if (XTYPE (c) != Lisp_Buffer)
+ echo_area_glyphs = 0;
/* Handle things that only apply to characters. */
if (XTYPE (c) == Lisp_Int)
&& EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
echo_char (c);
- /* Record this character as part of the current key.
- Don't record mouse motion; it should never matter. */
+ /* Record this character as part of the current key. */
add_command_key (c);
/* Re-reading in the middle of a command */
"help",
"break", /* 0xff6b */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, "backtab", 0,
0, /* 0xff76 */
0, 0, 0, 0, 0, 0, 0, 0, "kp-numlock", /* 0xff7f */
"kp-space", /* 0xff80 */ /* IsKeypadKey */
"kp-f2",
"kp-f3",
"kp-f4",
- 0, /* 0xff95 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ "kp-home", /* 0xff95 */
+ "kp-left",
+ "kp-up",
+ "kp-right",
+ "kp-down",
+ "kp-prior", /* kp-page-up */
+ "kp-next", /* kp-page-down */
+ "kp-end",
+ "kp-begin",
+ "kp-insert",
+ "kp-delete",
+ 0, /* 0xffa0 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
"kp-multiply", /* 0xffaa */
"kp-add",
"kp-separator",
menu_bar_item (key, item_string, Fcdr (binding));
}
else if (EQ (binding, Qundefined))
- menu_bar_item (key, item_string, binding);
+ menu_bar_item (key, Qnil, binding);
}
else if (XTYPE (item) == Lisp_Vector)
{
menu_bar_item (key, item_string, Fcdr (binding));
}
else if (EQ (binding, Qundefined))
- menu_bar_item (key, item_string, binding);
+ menu_bar_item (key, Qnil, binding);
}
}
}
menu_bar_items_index -= 3;
return;
}
+
+ /* If there's no definition for this key yet,
+ just ignore `undefined'. */
+ return;
}
/* See if this entry is enabled. */
int width = FRAME_WIDTH (selected_frame) - 4;
char *menu = (char *) alloca (width + 4);
int idx = -1;
- int nobindings ;
+ int nobindings = 1;
Lisp_Object rest, vector;
if (! menu_prompting)
Qactivate_menubar_hook = intern ("activate-menubar-hook");
staticpro (&Qactivate_menubar_hook);
+ Qpolling_period = intern ("polling-period");
+ staticpro (&Qpolling_period);
+
{
struct event_head *p;
Vcommand_hook_internal = Qnil;
DEFVAR_LISP ("pre-command-hook", &Vpre_command_hook,
- "Normal hook run before each command is executed.");
+ "Normal hook run before each command is executed.\n\
+While the hook is run, its value is temporarily set to nil\n\
+to avoid an unbreakable infinite loop if a hook function gets an error.\n\
+As a result, a hook function cannot straightforwardly alter the value of\n\
+`pre-command-hook'. See the Emacs Lisp manual for a way of\n\
+implementing hook functions that alter the set of hook functions.");
Vpre_command_hook = Qnil;
DEFVAR_LISP ("post-command-hook", &Vpost_command_hook,
- "Normal hook run after each command is executed.");
+ "Normal hook run after each command is executed.\n\
+While the hook is run, its value is temporarily set to nil\n\
+to avoid an unbreakable infinite loop if a hook function gets an error.\n\
+As a result, a hook function cannot straightforwardly alter the value of\n\
+`post-command-hook'. See the Emacs Lisp manual for a way of\n\
+implementing hook functions that alter the set of hook functions.");
Vpost_command_hook = Qnil;
DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,