From: Stefan Monnier Date: Fri, 6 Jun 2014 02:22:40 +0000 (-0400) Subject: * src/keyboard.c (read_char): Handle (t . ) in the second use of X-Git-Tag: emacs-25.0.90~2639^2~101 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=79b0d21638cce19216607a89b6470b1e72a028b8;p=emacs.git * src/keyboard.c (read_char): Handle (t . ) in the second use of Vunread_command_events. Fixes: debbugs:17650 --- diff --git a/src/ChangeLog b/src/ChangeLog index 38feb804cd4..a56a0a27d92 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,12 @@ +2014-06-06 Stefan Monnier + + * keyboard.c (read_char): Handle (t . ) in the second use of + Vunread_command_events (bug#17650). + 2014-06-06 Dmitry Antipov - * xterm.c (x_setup_pointer_blanking): Conditionally - probe Xfixes until this stuff is stabilized (Bug#17609). + * xterm.c (x_setup_pointer_blanking): + Conditionally probe Xfixes until this stuff is stabilized (Bug#17609). 2014-06-05 Dmitry Antipov @@ -19,14 +24,13 @@ * nsterm.h (ns_popup_dialog): Adjust prototype. * nsterm.m (ns_create_terminal): * w32term.c (w32_create_terminal): - * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]: Setup - popup_dialog_hook. + * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]: + Setup popup_dialog_hook. 2014-06-04 Eli Zaretskii * w32heap.c (report_temacs_memory_usage): Improve the report by - reporting the large blocks that are actually occupied at dump - time. + reporting the large blocks that are actually occupied at dump time. * w32console.c (initialize_w32_display): Set the console menu_show_hook, otherwise TTY menus are broken on w32. @@ -86,8 +90,7 @@ 2014-06-03 Eli Zaretskii * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use - HEAPSIZE; instead, define separate values for the 32- and 64-bit - builds. + HEAPSIZE; instead, define separate values for the 32- and 64-bit builds. (calloc): Don't undef, it is never defined. (HEAP_ENTRY_SHIFT): Remove unused macro. @@ -103,16 +106,15 @@ 2014-06-03 Paul Eggert - * process.c (wait_reading_process_output): Omit incorrect test - of p->infd against zero. Add easserts for infd having a plausible - value. + * process.c (wait_reading_process_output): Omit incorrect test of + p->infd against zero. Add easserts for infd having a plausible value. 2014-06-02 Dmitry Antipov Adjust to match recent lwlib changes. - * menu.h (xmalloc_widget_value): Replaced by ... + * menu.h (xmalloc_widget_value): Replace by ... (make_widget_value): ... new prototype. - * menu.c (xmalloc_widget_value): Replaced by ... + * menu.c (xmalloc_widget_value): Replace by ... (make_widget_value): ... new function. (free_menubar_widget_value_tree, digest_single_submenu): Adjust users. * gtkutil.c (malloc_widget_value, free_widget_value): @@ -272,8 +274,8 @@ * w32heap.c (report_temacs_memory_usage): New function. - * unexw32.c (unexec) [ENABLE_CHECKING]: Call - report_temacs_memory_usage. + * unexw32.c (unexec) [ENABLE_CHECKING]: + Call report_temacs_memory_usage. * w32heap.h (report_temacs_memory_usage): Add prototype. @@ -372,8 +374,7 @@ * image.c (free_image): Undef free for Windows because it is redirected to our private version. - * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits - compatibility. + * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility. (copy_executable_and_dump_data): Remove dumping the heap section. (unexec): Restore using_dynamic_heap after dumping. @@ -401,8 +402,7 @@ 2014-05-26 Eli Zaretskii - * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if - undefined. + * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined. 2014-05-26 Ken Brown @@ -491,7 +491,7 @@ was moved to Fgarbage_collect. (Fgarbage_collect): Calculate the end address of the stack portion that needs to be examined by mark_stack, and pass that address to - garbage_collect_1, which will pass it to mark_stack. See + garbage_collect_1, which will pass it to mark_stack. See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html for more details about the underlying problems. In particular, this avoids dumping Emacs with the large hash-table whose value is diff --git a/src/keyboard.c b/src/keyboard.c index 80b1f521310..c9cd222b110 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2434,7 +2434,6 @@ read_char (int commandflag, Lisp_Object map, retry: - reread = 0; if (CONSP (Vunread_post_input_method_events)) { c = XCAR (Vunread_post_input_method_events); @@ -2448,9 +2447,12 @@ read_char (int commandflag, Lisp_Object map, && NILP (XCDR (c))) c = XCAR (c); - reread = 1; + reread = true; goto reread_first; } + else + reread = false; + if (CONSP (Vunread_command_events)) { @@ -2459,17 +2461,13 @@ read_char (int commandflag, Lisp_Object map, c = XCAR (Vunread_command_events); Vunread_command_events = XCDR (Vunread_command_events); - reread = 1; - /* Undo what sit-for did when it unread additional keys inside universal-argument. */ - if (CONSP (c) - && EQ (XCAR (c), Qt)) - { - reread = 0; + if (CONSP (c) && EQ (XCAR (c), Qt)) c = XCDR (c); - } + else + reread = true; /* Undo what read_char_x_menu_prompt did when it unread additional keys returned by Fx_popup_menu. */ @@ -2503,7 +2501,7 @@ read_char (int commandflag, Lisp_Object map, && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c))) && NILP (XCDR (c))) c = XCAR (c); - reread = 1; + reread = true; goto reread_for_input_method; } @@ -2844,6 +2842,11 @@ read_char (int commandflag, Lisp_Object map, { c = XCAR (Vunread_command_events); Vunread_command_events = XCDR (Vunread_command_events); + + if (CONSP (c) && EQ (XCAR (c), Qt)) + c = XCDR (c); + else + reread = true; } /* Read something from current KBOARD's side queue, if possible. */ @@ -2897,8 +2900,8 @@ read_char (int commandflag, Lisp_Object map, { c = read_decoded_event_from_main_queue (end_time, local_getcjmp, prev_event, used_mouse_menu); - if (NILP(c) && end_time && - timespec_cmp (*end_time, current_timespec ()) <= 0) + if (NILP (c) && end_time + && timespec_cmp (*end_time, current_timespec ()) <= 0) { goto exit; }