From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: oscarfv@telefonica.net (=?UTF-8?Q?=C3=93scar?= Fuentes) Newsgroups: gmane.emacs.bugs Subject: bug#19875: 25.0.50; Setting an input-method-function breaks prefix show on the echo area Date: Sun, 15 Feb 2015 19:03:56 +0100 Message-ID: <87fva7hx0z.fsf@wanadoo.es> References: <87k2zjhzsf.fsf@telefonica.net> <83pp9buloa.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424023533 13128 80.91.229.3 (15 Feb 2015 18:05:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2015 18:05:33 +0000 (UTC) Cc: 19875@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 15 19:05:22 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YN3ZI-0000uG-Jn for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Feb 2015 19:05:20 +0100 Original-Received: from localhost ([::1]:36160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN3ZI-00024i-09 for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Feb 2015 13:05:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN3Z5-00021S-OA for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2015 13:05:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YN3Z1-00023s-3S for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2015 13:05:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN3Z1-00023V-0D for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2015 13:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YN3Z0-00060g-IG for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2015 13:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: oscarfv@telefonica.net (=?UTF-8?Q?=C3=93scar?= Fuentes) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Feb 2015 18:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19875-submit@debbugs.gnu.org id=B19875.142402344823039 (code B ref 19875); Sun, 15 Feb 2015 18:05:02 +0000 Original-Received: (at 19875) by debbugs.gnu.org; 15 Feb 2015 18:04:08 +0000 Original-Received: from localhost ([127.0.0.1]:44901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YN3Y8-0005zW-Fo for submit@debbugs.gnu.org; Sun, 15 Feb 2015 13:04:08 -0500 Original-Received: from smtp08.acens.net ([86.109.99.132]:37888 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YN3Y4-0005z0-Sx for 19875@debbugs.gnu.org; Sun, 15 Feb 2015 13:04:06 -0500 X-CTCH-RefID: str=0001.0A0B020D.54E0DF8D.0075, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Spam: Unknown Original-Received: from qcore (88.10.128.129) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 549C742B019CE1BA; Sun, 15 Feb 2015 18:03:57 +0000 In-Reply-To: <83pp9buloa.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Feb 2015 19:30:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99441 Archived-At: Eli Zaretskii writes: > This happens on the release branch, and in Emacs 24.4 as well. The relevant area of code in keyboard.c is very old. The bug probably has more than 15 years. Semi-blind fix attempt: diff --git a/src/keyboard.c b/src/keyboard.c index bcb51cf..8b65f0e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3095,7 +3095,15 @@ 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 if the user is + introducing a prefix argument. Otherwise we end with + repetitions of the partially introduced prefix + argument. (bug#19875) */ + Lisp_Object pa = intern ("prefix-arg"); + if (NILP(pa)) + { + kset_echo_string (current_kboard, saved_echo_string); + } current_kboard->echo_after_prompt = saved_echo_after_prompt; if (saved_immediate_echo) echo_now ();