comparison src/keyboard.c @ 89943:4c90ffeb71c5

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-15 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-218 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-220 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-221 Restore deleted tagline in etc/TUTORIAL.ru * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-222 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-228 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-229 Remove TeX output files from the archive * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248 src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-256 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-258 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-263 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-264 Update from CVS: lispref/display.texi: emacs -> Emacs. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-265 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275 Update from CVS: man/makefile.w32-in: Revert last change * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 Allow restarting an existing debugger session that's exited * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-327 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-328 Update from CVS: src/.gdbinit (xsymbol): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-329 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-344 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-345 Tweak source regexps so that building in place won't cause problems * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-346 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-352 Update from CVS: lisp/flymake.el: New file. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-353 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-362 Support " [...]" style defaults in minibuffer-electric-default-mode * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-363 (read-number): Use canonical format for default in prompt. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-364 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-367 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-368 Improve display-supports-face-attributes-p on non-ttys * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-369 Rewrite face-differs-from-default-p * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-370 Move `display-supports-face-attributes-p' entirely into C code * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-371 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-372 Simplify face-differs-from-default-p; don't consider :stipple. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-373 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-374 (tty_supports_face_attributes_p): Ensure attributes differ from default * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-375 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-376 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377 (Fdisplay_supports_face_attributes_p): Work around bootstrapping problem * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-378 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-380 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-381 Face merging cleanups * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-382 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-384 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-385 src/xfaces.c (push_named_merge_point): Return 0 if a cycle is detected * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-386 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-396 Tweak arch tagging to make build/install-in-place less annoying * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397 Work around vc-arch problems when building eshell * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-398 Tweak permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-399 Tweak directory permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-401 More build-in-place tweaking of arch tagging * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-403 Yet more build-in-place tweaking of arch tagging * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-404 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410 Make sure image types are initialized for lookup too * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416 Update from CVS
author Miles Bader <miles@gnu.org>
date Mon, 28 Jun 2004 07:56:49 +0000
parents 68c22ea6027c 8715315bd4ab
children 029a652ac817
comparison
equal deleted inserted replaced
89942:9cb747ae49af 89943:4c90ffeb71c5
115 Lisp_Object *args; /* Points to vector of args. */ 115 Lisp_Object *args; /* Points to vector of args. */
116 int nargs; /* length of vector. If nargs is UNEVALLED, 116 int nargs; /* length of vector. If nargs is UNEVALLED,
117 args points to slot holding list of 117 args points to slot holding list of
118 unevalled args */ 118 unevalled args */
119 char evalargs; 119 char evalargs;
120 /* Nonzero means call value of debugger when done with this operation. */
121 char debug_on_exit;
120 }; 122 };
121 123
122 #ifdef MULTI_KBOARD 124 #ifdef MULTI_KBOARD
123 KBOARD *initial_kboard; 125 KBOARD *initial_kboard;
124 KBOARD *current_kboard; 126 KBOARD *current_kboard;
677 679
678 /* Nonzero means don't try to suspend even if the operating system seems 680 /* Nonzero means don't try to suspend even if the operating system seems
679 to support it. */ 681 to support it. */
680 static int cannot_suspend; 682 static int cannot_suspend;
681 683
684 extern Lisp_Object Qidentity, Qonly;
685
682 /* Install the string STR as the beginning of the string of echoing, 686 /* Install the string STR as the beginning of the string of echoing,
683 so that it serves as a prompt for the next character. 687 so that it serves as a prompt for the next character.
684 Also start echoing. */ 688 Also start echoing. */
685 689
686 void 690 void
994 () 998 ()
995 { 999 {
996 int count = SPECPDL_INDEX (); 1000 int count = SPECPDL_INDEX ();
997 Lisp_Object buffer; 1001 Lisp_Object buffer;
998 1002
1003 /* If we enter while input is blocked, don't lock up here.
1004 This may happen through the debugger during redisplay. */
1005 if (INPUT_BLOCKED_P)
1006 return Qnil;
1007
999 command_loop_level++; 1008 command_loop_level++;
1000 update_mode_lines = 1; 1009 update_mode_lines = 1;
1001 1010
1002 if (command_loop_level 1011 if (command_loop_level
1003 && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer)) 1012 && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
1149 1158
1150 Vquit_flag = Qnil; 1159 Vquit_flag = Qnil;
1151 1160
1152 Vinhibit_quit = Qnil; 1161 Vinhibit_quit = Qnil;
1153 #ifdef MULTI_KBOARD 1162 #ifdef MULTI_KBOARD
1154 any_kboard_state (); 1163 if (command_loop_level == 0 && minibuf_level == 0)
1164 any_kboard_state ();
1155 #endif 1165 #endif
1156 1166
1157 return make_number (0); 1167 return make_number (0);
1158 } 1168 }
1159 1169
1238 } 1248 }
1239 else 1249 else
1240 while (1) 1250 while (1)
1241 { 1251 {
1242 internal_catch (Qtop_level, top_level_1, Qnil); 1252 internal_catch (Qtop_level, top_level_1, Qnil);
1253 /* Reset single_kboard in case top-level set it while
1254 evaluating an -f option, or we are stuck there for some
1255 other reason. */
1256 any_kboard_state ();
1243 internal_catch (Qtop_level, command_loop_2, Qnil); 1257 internal_catch (Qtop_level, command_loop_2, Qnil);
1244 executing_macro = Qnil; 1258 executing_macro = Qnil;
1245 1259
1246 /* End of file in -batch run causes exit here. */ 1260 /* End of file in -batch run causes exit here. */
1247 if (noninteractive) 1261 if (noninteractive)
1292 { 1306 {
1293 #ifdef HAVE_X_WINDOWS 1307 #ifdef HAVE_X_WINDOWS
1294 if (display_hourglass_p) 1308 if (display_hourglass_p)
1295 cancel_hourglass (); 1309 cancel_hourglass ();
1296 #endif 1310 #endif
1311
1312 /* Unblock input if we enter with input blocked. This may happen if
1313 redisplay traps e.g. during tool-bar update with input blocked. */
1314 while (INPUT_BLOCKED_P)
1315 UNBLOCK_INPUT;
1316
1297 return Fthrow (Qtop_level, Qnil); 1317 return Fthrow (Qtop_level, Qnil);
1298 } 1318 }
1299 1319
1300 DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", 1320 DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
1301 doc: /* Exit from the innermost recursive edit or minibuffer. */) 1321 doc: /* Exit from the innermost recursive edit or minibuffer. */)
1802 } 1822 }
1803 else if (current_buffer != prev_buffer || MODIFF != prev_modiff) 1823 else if (current_buffer != prev_buffer || MODIFF != prev_modiff)
1804 call1 (Vrun_hooks, intern ("activate-mark-hook")); 1824 call1 (Vrun_hooks, intern ("activate-mark-hook"));
1805 } 1825 }
1806 1826
1827 /* Setting transient-mark-mode to `only' is a way of
1828 turning it on for just one command. */
1829 if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
1830 {
1831 if (EQ (Vtransient_mark_mode, Qidentity))
1832 Vtransient_mark_mode = Qnil;
1833 if (EQ (Vtransient_mark_mode, Qonly))
1834 Vtransient_mark_mode = Qidentity;
1835 }
1836
1807 finalize: 1837 finalize:
1808 1838
1809 if (current_buffer == prev_buffer 1839 if (current_buffer == prev_buffer
1810 && last_point_position != PT 1840 && last_point_position != PT
1811 && NILP (Vdisable_point_adjustment) 1841 && NILP (Vdisable_point_adjustment)
3965 #endif 3995 #endif
3966 #ifdef WINDOWSNT 3996 #ifdef WINDOWSNT
3967 else if (event->kind == LANGUAGE_CHANGE_EVENT) 3997 else if (event->kind == LANGUAGE_CHANGE_EVENT)
3968 { 3998 {
3969 /* Make an event (language-change (FRAME CHARSET LCID)). */ 3999 /* Make an event (language-change (FRAME CHARSET LCID)). */
3970 obj = Fcons (event->modifiers, Qnil); 4000 obj = Fcons (event->frame_or_window, Qnil);
3971 obj = Fcons (event->code, obj);
3972 obj = Fcons (event->frame_or_window, obj);
3973 obj = Fcons (Qlanguage_change, Fcons (obj, Qnil)); 4001 obj = Fcons (Qlanguage_change, Fcons (obj, Qnil));
3974 kbd_fetch_ptr = event + 1; 4002 kbd_fetch_ptr = event + 1;
3975 } 4003 }
3976 #endif 4004 #endif
3977 else if (event->kind == SAVE_SESSION_EVENT) 4005 else if (event->kind == SAVE_SESSION_EVENT)
6243 value = Fcdr_safe (Fassq (symbol_int, name_alist_or_stem)); 6271 value = Fcdr_safe (Fassq (symbol_int, name_alist_or_stem));
6244 else if (STRINGP (name_alist_or_stem)) 6272 else if (STRINGP (name_alist_or_stem))
6245 { 6273 {
6246 int len = SBYTES (name_alist_or_stem); 6274 int len = SBYTES (name_alist_or_stem);
6247 char *buf = (char *) alloca (len + 50); 6275 char *buf = (char *) alloca (len + 50);
6248 if (sizeof (int) == sizeof (EMACS_INT)) 6276 sprintf (buf, "%s-%ld", SDATA (name_alist_or_stem),
6249 sprintf (buf, "%s-%d", SDATA (name_alist_or_stem), 6277 (long) XINT (symbol_int) + 1);
6250 XINT (symbol_int) + 1);
6251 else if (sizeof (long) == sizeof (EMACS_INT))
6252 sprintf (buf, "%s-%ld", SDATA (name_alist_or_stem),
6253 XINT (symbol_int) + 1);
6254 else
6255 abort ();
6256 value = intern (buf); 6278 value = intern (buf);
6257 } 6279 }
6258 else if (name_table != 0 && name_table[symbol_num]) 6280 else if (name_table != 0 && name_table[symbol_num])
6259 value = intern (name_table[symbol_num]); 6281 value = intern (name_table[symbol_num]);
6260 6282
7407 } 7429 }
7408 7430
7409 newcache = chkcache; 7431 newcache = chkcache;
7410 if (chkcache) 7432 if (chkcache)
7411 { 7433 {
7412 tem = Fkey_description (tem); 7434 tem = Fkey_description (tem, Qnil);
7413 if (CONSP (prefix)) 7435 if (CONSP (prefix))
7414 { 7436 {
7415 if (STRINGP (XCAR (prefix))) 7437 if (STRINGP (XCAR (prefix)))
7416 tem = concat2 (XCAR (prefix), tem); 7438 tem = concat2 (XCAR (prefix), tem);
7417 if (STRINGP (XCDR (prefix))) 7439 if (STRINGP (XCDR (prefix)))
9665 backtrace_list = &backtrace; 9687 backtrace_list = &backtrace;
9666 backtrace.function = &Qcall_interactively; 9688 backtrace.function = &Qcall_interactively;
9667 backtrace.args = &cmd; 9689 backtrace.args = &cmd;
9668 backtrace.nargs = 1; 9690 backtrace.nargs = 1;
9669 backtrace.evalargs = 0; 9691 backtrace.evalargs = 0;
9692 backtrace.debug_on_exit = 0;
9670 9693
9671 tem = Fcall_interactively (cmd, record_flag, keys); 9694 tem = Fcall_interactively (cmd, record_flag, keys);
9672 9695
9673 backtrace_list = backtrace.next; 9696 backtrace_list = backtrace.next;
9674 return tem; 9697 return tem;
9701 if (EQ (prefixarg, Qminus)) 9724 if (EQ (prefixarg, Qminus))
9702 strcpy (buf, "- "); 9725 strcpy (buf, "- ");
9703 else if (CONSP (prefixarg) && XINT (XCAR (prefixarg)) == 4) 9726 else if (CONSP (prefixarg) && XINT (XCAR (prefixarg)) == 4)
9704 strcpy (buf, "C-u "); 9727 strcpy (buf, "C-u ");
9705 else if (CONSP (prefixarg) && INTEGERP (XCAR (prefixarg))) 9728 else if (CONSP (prefixarg) && INTEGERP (XCAR (prefixarg)))
9706 { 9729 sprintf (buf, "%ld ", (long) XINT (XCAR (prefixarg)));
9707 if (sizeof (int) == sizeof (EMACS_INT))
9708 sprintf (buf, "%d ", XINT (XCAR (prefixarg)));
9709 else if (sizeof (long) == sizeof (EMACS_INT))
9710 sprintf (buf, "%ld ", (long) XINT (XCAR (prefixarg)));
9711 else
9712 abort ();
9713 }
9714 else if (INTEGERP (prefixarg)) 9730 else if (INTEGERP (prefixarg))
9715 { 9731 sprintf (buf, "%ld ", (long) XINT (prefixarg));
9716 if (sizeof (int) == sizeof (EMACS_INT))
9717 sprintf (buf, "%d ", XINT (prefixarg));
9718 else if (sizeof (long) == sizeof (EMACS_INT))
9719 sprintf (buf, "%ld ", (long) XINT (prefixarg));
9720 else
9721 abort ();
9722 }
9723 9732
9724 /* This isn't strictly correct if execute-extended-command 9733 /* This isn't strictly correct if execute-extended-command
9725 is bound to anything else. Perhaps it should use 9734 is bound to anything else. Perhaps it should use
9726 this_command_keys? */ 9735 this_command_keys? */
9727 strcat (buf, "M-x "); 9736 strcat (buf, "M-x ");
9805 char *newmessage; 9814 char *newmessage;
9806 int message_p = push_message (); 9815 int message_p = push_message ();
9807 int count = SPECPDL_INDEX (); 9816 int count = SPECPDL_INDEX ();
9808 9817
9809 record_unwind_protect (pop_message_unwind, Qnil); 9818 record_unwind_protect (pop_message_unwind, Qnil);
9810 binding = Fkey_description (bindings); 9819 binding = Fkey_description (bindings, Qnil);
9811 9820
9812 newmessage 9821 newmessage
9813 = (char *) alloca (SCHARS (SYMBOL_NAME (function)) 9822 = (char *) alloca (SCHARS (SYMBOL_NAME (function))
9814 + SBYTES (binding) 9823 + SBYTES (binding)
9815 + 100); 9824 + 100);
10486 val[1] = flow_control ? Qt : Qnil; 10495 val[1] = flow_control ? Qt : Qnil;
10487 val[2] = meta_key == 2 ? make_number (0) : meta_key == 1 ? Qt : Qnil; 10496 val[2] = meta_key == 2 ? make_number (0) : meta_key == 1 ? Qt : Qnil;
10488 XSETFASTINT (val[3], quit_char); 10497 XSETFASTINT (val[3], quit_char);
10489 10498
10490 return Flist (sizeof (val) / sizeof (val[0]), val); 10499 return Flist (sizeof (val) / sizeof (val[0]), val);
10500 }
10501
10502 DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 3, 0,
10503 doc: /* Return position information for pixel coordinates X and Y.
10504 By default, X and Y are relative to text area of the selected window.
10505 Optional third arg FRAME_OR_WINDOW non-nil specifies frame or window.
10506
10507 The return value is similar to a mouse click position:
10508 (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
10509 IMAGE (DX . DY) (WIDTH . HEIGHT))
10510 The `posn-' functions access elements of such lists. */)
10511 (x, y, frame_or_window)
10512 Lisp_Object x, y, frame_or_window;
10513 {
10514 if (NILP (frame_or_window))
10515 frame_or_window = selected_window;
10516
10517 if (WINDOWP (frame_or_window))
10518 {
10519 struct window *w;
10520
10521 CHECK_LIVE_WINDOW (frame_or_window);
10522
10523 w = XWINDOW (frame_or_window);
10524 XSETINT (x, (WINDOW_TO_FRAME_PIXEL_X (w, XINT (x))
10525 + window_box_left_offset (w, TEXT_AREA)));
10526 XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XINT (y)));
10527 frame_or_window = w->frame;
10528 }
10529
10530 CHECK_LIVE_FRAME (frame_or_window);
10531
10532 return make_lispy_position (XFRAME (frame_or_window), &x, &y, 0);
10533 }
10534
10535 DEFUN ("posn-at-point", Fposn_at_point, Sposn_at_point, 0, 2, 0,
10536 doc: /* Return position information for buffer POS in WINDOW.
10537 POS defaults to point in WINDOW; WINDOW defaults to the selected window.
10538
10539 Return nil if position is not visible in window. Otherwise,
10540 the return value is similar to that returned by `event-start' for
10541 a mouse click at the upper left corner of the glyph corresponding
10542 to the given buffer position:
10543 (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
10544 IMAGE (DX . DY) (WIDTH . HEIGHT))
10545 The `posn-' functions access elements of such lists. */*/)
10546 (pos, window)
10547 Lisp_Object pos, window;
10548 {
10549 Lisp_Object tem;
10550
10551 tem = Fpos_visible_in_window_p (pos, window, Qt);
10552 if (!NILP (tem))
10553 tem = Fposn_at_x_y (XCAR (tem), XCAR (XCDR (tem)), window);
10554 return tem;
10491 } 10555 }
10492 10556
10493 10557
10494 /* 10558 /*
10495 * Set up a new kboard object with reasonable initial values. 10559 * Set up a new kboard object with reasonable initial values.
10911 defsubr (&Sdiscard_input); 10975 defsubr (&Sdiscard_input);
10912 defsubr (&Sopen_dribble_file); 10976 defsubr (&Sopen_dribble_file);
10913 defsubr (&Sset_input_mode); 10977 defsubr (&Sset_input_mode);
10914 defsubr (&Scurrent_input_mode); 10978 defsubr (&Scurrent_input_mode);
10915 defsubr (&Sexecute_extended_command); 10979 defsubr (&Sexecute_extended_command);
10980 defsubr (&Sposn_at_point);
10981 defsubr (&Sposn_at_x_y);
10916 10982
10917 DEFVAR_LISP ("last-command-char", &last_command_char, 10983 DEFVAR_LISP ("last-command-char", &last_command_char,
10918 doc: /* Last input event that was part of a command. */); 10984 doc: /* Last input event that was part of a command. */);
10919 10985
10920 DEFVAR_LISP_NOPRO ("last-command-event", &last_command_char, 10986 DEFVAR_LISP_NOPRO ("last-command-event", &last_command_char,
11355 struct input_event *event; 11421 struct input_event *event;
11356 for (event = kbd_fetch_ptr; event != kbd_store_ptr; event++) 11422 for (event = kbd_fetch_ptr; event != kbd_store_ptr; event++)
11357 { 11423 {
11358 if (event == kbd_buffer + KBD_BUFFER_SIZE) 11424 if (event == kbd_buffer + KBD_BUFFER_SIZE)
11359 event = kbd_buffer; 11425 event = kbd_buffer;
11360 mark_object (event->x); 11426 if (event->kind != SELECTION_REQUEST_EVENT)
11361 mark_object (event->y); 11427 {
11428 mark_object (event->x);
11429 mark_object (event->y);
11430 }
11362 mark_object (event->frame_or_window); 11431 mark_object (event->frame_or_window);
11363 mark_object (event->arg); 11432 mark_object (event->arg);
11364 } 11433 }
11365 } 11434 }
11366 } 11435 }