if (CONSP (c) && EQ (XCAR (c), Qhelp_echo))
{
/* (help-echo FRAME HELP WINDOW OBJECT POS). */
- Lisp_Object help, object, position, window;
- help = Fnth (make_number (2), c);
- window = Fnth (make_number (3), c);
- object = Fnth (make_number (4), c);
- position = Fnth (make_number (5), c);
+ Lisp_Object help, object, position, window, tem;
+
+ tem = Fcdr (XCDR (c));
+ help = Fcar (tem);
+ tem = Fcdr (tem);
+ window = Fcar (tem);
+ tem = Fcdr (tem);
+ object = Fcar (tem);
+ tem = Fcdr (tem);
+ position = Fcar (tem);
+
show_help_echo (help, window, object, position, 0);
/* We stopped being idle for this event; undo that. */
{
Lisp_Object help;
- help = Fnth (make_number (2), c);
+ help = Fcar (Fcdr (XCDR (c)));
if (STRINGP (help))
{
int last_idx;
if (!CONSP (last_c)
|| !EQ (XCAR (last_c), Qhelp_echo)
- || (last_help = Fnth (make_number (2), last_c),
+ || (last_help = Fcar (Fcdr (XCDR (last_c))),
!EQ (last_help, help)))
{
total_keys++;
else
#endif
{
- /* The third element of every position should be the (x,y)
- pair. */
Lisp_Object down;
+ EMACS_INT xdiff = double_click_fuzz, ydiff = double_click_fuzz;
- down = Fnth (make_number (2), start_pos);
- if (EQ (event->x, XCAR (down)) && EQ (event->y, XCDR (down)))
- /* Mouse hasn't moved. */
+ /* The third element of every position
+ should be the (x,y) pair. */
+ down = Fcar (Fcdr (Fcdr (start_pos)));
+ if (CONSP (down)
+ && INTEGERP (XCAR (down)) && INTEGERP (XCDR (down)))
+ {
+ xdiff = XFASTINT (event->x) - XFASTINT (XCAR (down));
+ ydiff = XFASTINT (event->y) - XFASTINT (XCDR (down));
+ }
+
+ if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
+ && ydiff < double_click_fuzz
+ && ydiff > - double_click_fuzz)
+ /* Mouse hasn't moved (much). */
event->modifiers |= click_modifier;
else
{
- Lisp_Object window1, window2, posn1, posn2;
-
- /* Avoid generating a drag event if the mouse
- hasn't actually moved off the buffer position. */
- window1 = Fnth (make_number (0), position);
- posn1 = Fnth (make_number (1), position);
- window2 = Fnth (make_number (0), start_pos);
- posn2 = Fnth (make_number (1), start_pos);
-
- if (EQ (window1, window2) && EQ (posn1, posn2))
- event->modifiers |= click_modifier;
- else
- {
- button_down_time = 0;
- event->modifiers |= drag_modifier;
- }
+ button_down_time = 0;
+ event->modifiers |= drag_modifier;
}
/* Don't check is_double; treat this as multiple
int i;
int modifiers;
- CHECK_SYMBOL (symbol, 1);
+ CHECK_SYMBOL (symbol);
modifiers = 0;
name = XSYMBOL (symbol)->name;
int count = specpdl_ptr - specpdl;
if (!NILP (prompt))
- CHECK_STRING (prompt, 0);
+ CHECK_STRING (prompt);
QUIT;
specbind (Qinput_method_exit_on_first_char,
int count = specpdl_ptr - specpdl;
if (!NILP (prompt))
- CHECK_STRING (prompt, 0);
+ CHECK_STRING (prompt);
QUIT;
specbind (Qinput_method_exit_on_first_char,
DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 0, 0,
- doc: /* T if command input is currently available with no waiting.
-Actually, the value is nil only if we can be sure that no input is available. */)
+ doc: /* Return t if command input is currently available with no wait.
+Actually, the value is nil only if we can be sure that no input is available;
+if there is a doubt, the value is t. */)
()
{
if (!NILP (Vunread_command_events) || unread_command_char != -1)
struct gcpro gcpro1;
if (!NILP (stuffstring))
- CHECK_STRING (stuffstring, 0);
+ CHECK_STRING (stuffstring);
/* Run the functions in suspend-hook. */
if (!NILP (Vrun_hooks))
so that you can determine whether the command was run by mouse or not. */);
DEFVAR_LISP ("last-input-char", &last_input_char,
- doc: /* Last input character. */);
+ doc: /* Last input event. */);
DEFVAR_LISP_NOPRO ("last-input-event", &last_input_char,
doc: /* Last input event. */);
SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);
DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,
- doc: /* t means menu bar, specified Lucid style, needs to be recomputed. */);
+ doc: /* Non-nil means menu bar, specified Lucid style, needs to be recomputed. */);
Vlucid_menu_bar_dirty_flag = Qnil;
DEFVAR_LISP ("menu-bar-final-items", &Vmenu_bar_final_items,