/[emacs]/emacs/src/keyboard.c
ViewVC logotype

Diff of /emacs/src/keyboard.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.820 by mituharu, Tue Apr 12 10:25:05 2005 UTC revision 1.821 by rms, Sun May 1 18:47:16 2005 UTC
# Line 1186  cmd_error (data) Line 1186  cmd_error (data)
1186    
1187    Vstandard_output = Qt;    Vstandard_output = Qt;
1188    Vstandard_input = Qt;    Vstandard_input = Qt;
1189    Vexecuting_macro = Qnil;    Vexecuting_kbd_macro = Qnil;
1190    executing_macro = Qnil;    executing_macro = Qnil;
1191    current_kboard->Vprefix_arg = Qnil;    current_kboard->Vprefix_arg = Qnil;
1192    current_kboard->Vlast_prefix_arg = Qnil;    current_kboard->Vlast_prefix_arg = Qnil;
# Line 1453  command_loop_1 () Line 1453  command_loop_1 ()
1453            if (NILP (Vunread_command_events)            if (NILP (Vunread_command_events)
1454                && NILP (Vunread_input_method_events)                && NILP (Vunread_input_method_events)
1455                && NILP (Vunread_post_input_method_events)                && NILP (Vunread_post_input_method_events)
1456                && NILP (Vexecuting_macro)                && NILP (Vexecuting_kbd_macro)
1457                && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1)))                && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1)))
1458              safe_run_hooks (Qpost_command_idle_hook);              safe_run_hooks (Qpost_command_idle_hook);
1459          }          }
# Line 1582  command_loop_1 () Line 1582  command_loop_1 ()
1582          }          }
1583    
1584        cmd = read_key_sequence_cmd;        cmd = read_key_sequence_cmd;
1585        if (!NILP (Vexecuting_macro))        if (!NILP (Vexecuting_kbd_macro))
1586          {          {
1587            if (!NILP (Vquit_flag))            if (!NILP (Vquit_flag))
1588              {              {
1589                Vexecuting_macro = Qt;                Vexecuting_kbd_macro = Qt;
1590                QUIT;             /* Make some noise. */                QUIT;             /* Make some noise. */
1591                                  /* Will return since macro now empty. */                                  /* Will return since macro now empty. */
1592              }              }
# Line 1685  command_loop_1 () Line 1685  command_loop_1 ()
1685                        && EQ (current_buffer->selective_display, Qnil)                        && EQ (current_buffer->selective_display, Qnil)
1686                        && !detect_input_pending ()                        && !detect_input_pending ()
1687                        && NILP (XWINDOW (selected_window)->column_number_displayed)                        && NILP (XWINDOW (selected_window)->column_number_displayed)
1688                        && NILP (Vexecuting_macro))                        && NILP (Vexecuting_kbd_macro))
1689                      direct_output_forward_char (1);                      direct_output_forward_char (1);
1690                    goto directly_done;                    goto directly_done;
1691                  }                  }
# Line 1720  command_loop_1 () Line 1720  command_loop_1 ()
1720                        && EQ (current_buffer->selective_display, Qnil)                        && EQ (current_buffer->selective_display, Qnil)
1721                        && !detect_input_pending ()                        && !detect_input_pending ()
1722                        && NILP (XWINDOW (selected_window)->column_number_displayed)                        && NILP (XWINDOW (selected_window)->column_number_displayed)
1723                        && NILP (Vexecuting_macro))                        && NILP (Vexecuting_kbd_macro))
1724                      direct_output_forward_char (-1);                      direct_output_forward_char (-1);
1725                    goto directly_done;                    goto directly_done;
1726                  }                  }
# Line 1733  command_loop_1 () Line 1733  command_loop_1 ()
1733                      = translate_char (Vtranslation_table_for_input,                      = translate_char (Vtranslation_table_for_input,
1734                                        XFASTINT (last_command_char), 0, 0, 0);                                        XFASTINT (last_command_char), 0, 0, 0);
1735                    int value;                    int value;
1736                    if (NILP (Vexecuting_macro)                    if (NILP (Vexecuting_kbd_macro)
1737                        && !EQ (minibuf_window, selected_window))                        && !EQ (minibuf_window, selected_window))
1738                      {                      {
1739                        if (!nonundocount || nonundocount >= 20)                        if (!nonundocount || nonundocount >= 20)
# Line 1755  command_loop_1 () Line 1755  command_loop_1 ()
1755                            || !EQ (current_buffer->selective_display, Qnil)                            || !EQ (current_buffer->selective_display, Qnil)
1756                            || detect_input_pending ()                            || detect_input_pending ()
1757                            || !NILP (XWINDOW (selected_window)->column_number_displayed)                            || !NILP (XWINDOW (selected_window)->column_number_displayed)
1758                            || !NILP (Vexecuting_macro));                            || !NILP (Vexecuting_kbd_macro));
1759    
1760                    value = internal_self_insert (c, 0);                    value = internal_self_insert (c, 0);
1761    
# Line 1783  command_loop_1 () Line 1783  command_loop_1 ()
1783              int scount = SPECPDL_INDEX ();              int scount = SPECPDL_INDEX ();
1784    
1785              if (display_hourglass_p              if (display_hourglass_p
1786                  && NILP (Vexecuting_macro))                  && NILP (Vexecuting_kbd_macro))
1787                {                {
1788                  record_unwind_protect (cancel_hourglass_unwind, Qnil);                  record_unwind_protect (cancel_hourglass_unwind, Qnil);
1789                  start_hourglass ();                  start_hourglass ();
# Line 1801  command_loop_1 () Line 1801  command_loop_1 ()
1801               hourglass cursor anyway.               hourglass cursor anyway.
1802               But don't cancel the hourglass within a macro               But don't cancel the hourglass within a macro
1803               just because a command in the macro finishes.  */               just because a command in the macro finishes.  */
1804            if (NILP (Vexecuting_macro))            if (NILP (Vexecuting_kbd_macro))
1805              unbind_to (scount, Qnil);              unbind_to (scount, Qnil);
1806  #endif  #endif
1807            }            }
# Line 1827  command_loop_1 () Line 1827  command_loop_1 ()
1827            if (NILP (Vunread_command_events)            if (NILP (Vunread_command_events)
1828                && NILP (Vunread_input_method_events)                && NILP (Vunread_input_method_events)
1829                && NILP (Vunread_post_input_method_events)                && NILP (Vunread_post_input_method_events)
1830                && NILP (Vexecuting_macro)                && NILP (Vexecuting_kbd_macro)
1831                && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1)))                && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1)))
1832              safe_run_hooks (Qpost_command_idle_hook);              safe_run_hooks (Qpost_command_idle_hook);
1833          }          }
# Line 2499  read_char (commandflag, nmaps, maps, pre Line 2499  read_char (commandflag, nmaps, maps, pre
2499    
2500    this_command_key_count_reset = 0;    this_command_key_count_reset = 0;
2501    
2502    if (!NILP (Vexecuting_macro))    if (!NILP (Vexecuting_kbd_macro))
2503      {      {
2504        /* We set this to Qmacro; since that's not a frame, nobody will        /* We set this to Qmacro; since that's not a frame, nobody will
2505           try to switch frames on us, and the selected window will           try to switch frames on us, and the selected window will
# Line 2516  read_char (commandflag, nmaps, maps, pre Line 2516  read_char (commandflag, nmaps, maps, pre
2516        /* Exit the macro if we are at the end.        /* Exit the macro if we are at the end.
2517           Also, some things replace the macro with t           Also, some things replace the macro with t
2518           to force an early exit.  */           to force an early exit.  */
2519        if (EQ (Vexecuting_macro, Qt)        if (EQ (Vexecuting_kbd_macro, Qt)
2520            || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro)))            || executing_macro_index >= XFASTINT (Flength (Vexecuting_kbd_macro)))
2521          {          {
2522            XSETINT (c, -1);            XSETINT (c, -1);
2523            goto exit;            goto exit;
2524          }          }
2525    
2526        c = Faref (Vexecuting_macro, make_number (executing_macro_index));        c = Faref (Vexecuting_kbd_macro, make_number (executing_macro_index));
2527        if (STRINGP (Vexecuting_macro)        if (STRINGP (Vexecuting_kbd_macro)
2528            && (XINT (c) & 0x80) && (XUINT (c) <= 0xff))            && (XINT (c) & 0x80) && (XUINT (c) <= 0xff))
2529          XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80));          XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80));
2530    
# Line 9817  DEFUN ("execute-extended-command", Fexec Line 9817  DEFUN ("execute-extended-command", Fexec
9817    
9818    /* If enabled, show which key runs this command.  */    /* If enabled, show which key runs this command.  */
9819    if (!NILP (Vsuggest_key_bindings)    if (!NILP (Vsuggest_key_bindings)
9820        && NILP (Vexecuting_macro)        && NILP (Vexecuting_kbd_macro)
9821        && SYMBOLP (function))        && SYMBOLP (function))
9822      bindings = Fwhere_is_internal (function, Voverriding_local_map,      bindings = Fwhere_is_internal (function, Voverriding_local_map,
9823                                     Qt, Qnil, Qnil);                                     Qt, Qnil, Qnil);

Legend:
Removed from v.1.820  
changed lines
  Added in v.1.821

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26