From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48042: 26.3; Macros don't work with french-postfix input method Date: Sat, 15 May 2021 13:21:04 +0300 Message-ID: <834kf4xppr.fsf@gnu.org> References: <86pmyghqf1.fsf@upmc.fr> <425cd7715bc9fae8b39a@heytings.org> <831ra9zi4x.fsf@gnu.org> <425cd7715bda5353110e@heytings.org> <83y2chxvg4.fsf@gnu.org> <425cd7715b4c15a15813@heytings.org> <83v97lxu0f.fsf@gnu.org> <425cd7715b770b248347@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30020"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, harven@free.fr, 48042@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 12:22:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhrQw-0007cY-5M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 12:22:10 +0200 Original-Received: from localhost ([::1]:36326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhrQv-0002rh-6p for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 06:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhrQo-0002rW-Ud for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 06:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhrQo-00014m-Nc for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 06:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhrQo-0001ec-Hc for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 06:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 May 2021 10:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48042 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 48042-submit@debbugs.gnu.org id=B48042.16210740766298 (code B ref 48042); Sat, 15 May 2021 10:22:02 +0000 Original-Received: (at 48042) by debbugs.gnu.org; 15 May 2021 10:21:16 +0000 Original-Received: from localhost ([127.0.0.1]:47672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhrQ4-0001dV-11 for submit@debbugs.gnu.org; Sat, 15 May 2021 06:21:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhrQ1-0001dH-0W for 48042@debbugs.gnu.org; Sat, 15 May 2021 06:21:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40146) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhrPv-0000PQ-Eq; Sat, 15 May 2021 06:21:07 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4785 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhrPv-0002LJ-20; Sat, 15 May 2021 06:21:07 -0400 In-Reply-To: (message from Gregory Heytings on Sat, 15 May 2021 09:46:02 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206585 Archived-At: > Date: Sat, 15 May 2021 09:46:02 +0000 > From: Gregory Heytings > cc: Eli Zaretskii , harven@free.fr, 48042@debbugs.gnu.org > > Here is an updated patch, which uses the '(no-record . EVENT)' approach, > and whose changes are therefore limited to quail.el. Thanks. To tell you the truth, I'm a bit worried that you inhibit recording everywhere in quail.el, which seems to contradict my analysis from back when I made the inhibit--record-char. How many different input methods did you try with macros and "C-h l" to make sure this change indeed causes Emacs to record each produced character just once, and nothing is either omitted or recorded more than once? Did you try some CJK input methods, for example, which offer several alternatives for each key sequence the user typed? Other than this main issue, this LGTM, modulo some minor comments below. > +(defun quail-add-unread-command-events (key &optional reset) > + "Add KEY to `unread-command-events'. This summary line should mention that the function arranges for the events not to be recorded, and perhaps also explain in the rest of the doc string (or in a comment) why is that needed here. > +When KEY is a character, it is prepended to `unread-command-events' as a > +cons with a no-record car. > +When KEY is a vector, its elements are prepended to `unread-command-events' > +as conses with a no-record car. The last sentence above is not clear enough, IMO; I originally interpreted it incorrectly. I would suggest to reword: If KEY is a vector of events, the events are prepended to `unread-command-events', after converting each event to a cons cell of the form (no-record . EVENT). > +When RESET is non-nil, the events in `unread-command-events' are first > +discarded." I'm not sure we need this as part of the function: it makes the function more complicated for no good reason. Why not reset unread-command-events "by hand" in the one place where that is needed? Or maybe even explicitly use (no-record . 7) in that one place, and then you can avoid calling this function, since that one place does something very different from the rest. Please also make a single changeset out of this one and the one where you remove inhibit--record-char; see there for more comments. I see no need to separate them into two commits.