[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c |
Date: |
Tue, 04 Feb 2003 06:51:48 -0500 |
Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.723 emacs/src/keyboard.c:1.724
*** emacs/src/keyboard.c:1.723 Mon Feb 3 17:52:07 2003
--- emacs/src/keyboard.c Tue Feb 4 06:51:40 2003
***************
*** 169,181 ****
before this command was read. */
static int before_command_key_count;
static int before_command_echo_length;
- /* Values of before_command_key_count and before_command_echo_length
- saved by reset-this-command-lengths. */
- static int before_command_key_count_1;
- static int before_command_echo_length_1;
- /* Flag set by reset-this-command-lengths,
- saying to reset the lengths when add_command_key is called. */
- static int before_command_restore_flag;
extern int minbuf_level;
--- 169,174 ----
***************
*** 603,608 ****
--- 596,602 ----
extern char *x_get_keysym_name ();
static void record_menu_key ();
+ static int echo_length ();
Lisp_Object Qpolling_period;
***************
*** 847,857 ****
--- 841,866 ----
for (i = 0; i < this_command_key_count; i++)
{
Lisp_Object c;
+
+ /* Set before_command_echo_length to the value that would
+ have been saved before the start of this subcommand in
+ command_loop_1, if we had already been echoing then. */
+ if (i == this_single_command_key_start)
+ before_command_echo_length = echo_length ();
+
c = XVECTOR (this_command_keys)->contents[i];
if (! (EVENT_HAS_PARAMETERS (c)
&& EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
echo_char (c);
}
+
+ /* Set before_command_echo_length to the value that would
+ have been saved before the start of this subcommand in
+ command_loop_1, if we had already been echoing then. */
+ if (this_command_key_count == this_single_command_key_start)
+ before_command_echo_length = echo_length ();
+
+ /* Put a dash at the end to invite the user to type more. */
echo_dash ();
}
***************
*** 913,918 ****
--- 922,929 ----
add_command_key (key)
Lisp_Object key;
{
+ #if 0 /* Not needed after we made Freset_this_command_lengths
+ do the job immediately. */
/* If reset-this-command-length was called recently, obey it now.
See the doc string of that function for an explanation of why. */
if (before_command_restore_flag)
***************
*** 923,928 ****
--- 934,940 ----
echo_truncate (before_command_echo_length_1);
before_command_restore_flag = 0;
}
+ #endif
if (this_command_key_count >= ASIZE (this_command_keys))
this_command_keys = larger_vector (this_command_keys,
***************
*** 1587,1593 ****
/* Put this before calling adjust_point_for_property
so it will only get called once in any case. */
goto directly_done;
! adjust_point_for_property (last_point_position, 0);
already_adjusted = 1;
if (PT == last_point_position + 1
&& (dp
--- 1599,1609 ----
/* Put this before calling adjust_point_for_property
so it will only get called once in any case. */
goto directly_done;
! if (current_buffer == prev_buffer
! && last_point_position != PT
! && NILP (Vdisable_point_adjustment)
! && NILP (Vglobal_disable_point_adjustment))
! adjust_point_for_property (last_point_position, 0);
already_adjusted = 1;
if (PT == last_point_position + 1
&& (dp
***************
*** 1621,1627 ****
lose = FETCH_CHAR (PT_BYTE);
if (! NILP (Vpost_command_hook))
goto directly_done;
! adjust_point_for_property (last_point_position, 0);
already_adjusted = 1;
if (PT == last_point_position - 1
&& (dp
--- 1637,1647 ----
lose = FETCH_CHAR (PT_BYTE);
if (! NILP (Vpost_command_hook))
goto directly_done;
! if (current_buffer == prev_buffer
! && last_point_position != PT
! && NILP (Vdisable_point_adjustment)
! && NILP (Vglobal_disable_point_adjustment))
! adjust_point_for_property (last_point_position, 0);
already_adjusted = 1;
if (PT == last_point_position - 1
&& (dp
***************
*** 2289,2296 ****
--- 2309,2318 ----
also_record = Qnil;
+ #if 0 /* This was commented out as part of fixing echo for C-u left. */
before_command_key_count = this_command_key_count;
before_command_echo_length = echo_length ();
+ #endif
c = Qnil;
previous_echo_area_message = Qnil;
***************
*** 2362,2371 ****
goto reread_for_input_method;
}
- /* If there is no function key translated before
- reset-this-command-lengths takes effect, forget about it. */
- before_command_restore_flag = 0;
-
if (!NILP (Vexecuting_macro))
{
/* We set this to Qmacro; since that's not a frame, nobody will
--- 2384,2389 ----
***************
*** 2940,2945 ****
--- 2958,2964 ----
struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause;
int saved_echo_after_prompt = current_kboard->echo_after_prompt;
+ #if 0
if (before_command_restore_flag)
{
this_command_key_count = before_command_key_count_1;
***************
*** 2948,2953 ****
--- 2967,2973 ----
echo_truncate (before_command_echo_length_1);
before_command_restore_flag = 0;
}
+ #endif
/* Save the this_command_keys status. */
key_count = this_command_key_count;
***************
*** 3033,3040 ****
if (this_command_key_count == 0 || ! reread)
{
- before_command_key_count = this_command_key_count;
- before_command_echo_length = echo_length ();
/* Don't echo mouse motion events. */
if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
--- 3053,3058 ----
***************
*** 3106,3113 ****
--- 3124,3133 ----
record_char (c);
+ #if 0
before_command_key_count = this_command_key_count;
before_command_echo_length = echo_length ();
+ #endif
/* Don't echo mouse motion events. */
if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
***************
*** 9884,9892 ****
appears in the echo area and in the value of `this-command-keys'. */)
()
{
! before_command_restore_flag = 1;
! before_command_key_count_1 = before_command_key_count;
! before_command_echo_length_1 = before_command_echo_length;
return Qnil;
}
--- 9904,9914 ----
appears in the echo area and in the value of `this-command-keys'. */)
()
{
! this_command_key_count = before_command_key_count;
! if (this_command_key_count < this_single_command_key_start)
! this_single_command_key_start = this_command_key_count;
! echo_truncate (before_command_echo_length);
!
return Qnil;
}
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Kim F. Storm, 2003/02/03
- [Emacs-diffs] Changes to emacs/src/keyboard.c,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Juanma Barranquero, 2003/02/04
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Kim F. Storm, 2003/02/12
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Richard M. Stallman, 2003/02/17
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Jan Djärv, 2003/02/23
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Jan Djärv, 2003/02/25