]> code.delx.au - gnu-emacs/commitdiff
Fixes display of prefix argument when input-method-function
authorOscar Fuentes <ofv@wanadoo.es>
Wed, 18 Feb 2015 04:09:12 +0000 (05:09 +0100)
committerOscar Fuentes <ofv@wanadoo.es>
Wed, 18 Feb 2015 04:09:12 +0000 (05:09 +0100)
* keyboard.c (read_char): When there is an input method function,
do not restore the echo area if a prefix argument is being
introduced.  (Bug#19875)

src/ChangeLog
src/keyboard.c

index 76e195605fdbcefe7654a49d6f9bba26e0b5dd97..8a3b534e7aeda5cf7ea125bb97e9ec2a416e4ab8 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-18  Oscar Fuentes <ofv@wanadoo.es>
+
+       * keyboard.c (read_char): When there is an input method function,
+       do not restore the echo area if a prefix argument is being
+       introduced.  (Bug#19875)
+
 2015-02-16  Kelly Dean  <kelly@prtime.org>
 
        * src/keyboard.c (timer_check_2): Fix incorrect comment.
index ac70062a79b9a35b1f957988472c790ea61f618e..4f6a4414a0460b85468a54a195f29f1d65bae85a 100644 (file)
@@ -3095,7 +3095,14 @@ read_char (int commandflag, Lisp_Object map,
 
       cancel_echoing ();
       ok_to_echo_at_next_pause = saved_ok_to_echo;
-      kset_echo_string (current_kboard, saved_echo_string);
+      /* Do not restore the echo area string when the user is
+         introducing a prefix argument. Otherwise we end with
+         repetitions of the partially introduced prefix
+         argument. (bug#19875) */
+      if (NILP (intern ("prefix-arg")))
+        {
+          kset_echo_string (current_kboard, saved_echo_string);
+        }
       current_kboard->echo_after_prompt = saved_echo_after_prompt;
       if (saved_immediate_echo)
        echo_now ();