From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#49104: [PATCH] 28.0.50; Handle remapped commands for M-TAB in `flyspell-prog-mode' Date: Sat, 19 Jun 2021 10:31:38 -0700 Message-ID: References: <83a6nmxu95.fsf@gnu.org> <83pmwivyf7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19764"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49104@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 19 19:43:35 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 1luf0J-0004y1-70 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Jun 2021 19:43:35 +0200 Original-Received: from localhost ([::1]:47454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luf0I-00075l-7c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Jun 2021 13:43:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luep8-0006NS-BZ for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 13:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luep7-0007FS-V5 for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 13:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luep7-00038j-Qz for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 13:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jun 2021 17:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49104-submit@debbugs.gnu.org id=B49104.162412391412030 (code B ref 49104); Sat, 19 Jun 2021 17:32:01 +0000 Original-Received: (at 49104) by debbugs.gnu.org; 19 Jun 2021 17:31:54 +0000 Original-Received: from localhost ([127.0.0.1]:60688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luep0-00037x-3d for submit@debbugs.gnu.org; Sat, 19 Jun 2021 13:31:54 -0400 Original-Received: from mail-pf1-f179.google.com ([209.85.210.179]:43622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lueoy-00037k-Tp for 49104@debbugs.gnu.org; Sat, 19 Jun 2021 13:31:53 -0400 Original-Received: by mail-pf1-f179.google.com with SMTP id a127so10273971pfa.10 for <49104@debbugs.gnu.org>; Sat, 19 Jun 2021 10:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PaHVZGKWkgPyFWZVLZ30IL4qTsvzfUog7s6zozmAECk=; b=h2/3ttGGmf2Lduwo1hp7oCohGUoznaPv/EjZi/oIXY3Xlgd15WTv59lIKvwsnqwXkx ryKTISpIGSSWt8LR8MZDUbr6xINduLi6+VxXprvQH68n/FIRH8/RyKyvK0FU91poNHOV yYm3kcK4Y+z/DYnBaFW3XNUpyd0SjCr3C7Ylkqci67dU2OSxyvJqDLlcJegIicRUaFqX 42AI5subn7kK0uX33Coa7Ue4yEH2lzmmFAADfBfMEpx7rr7YZsWf06nHvqEazvi+ufCU iSEVPec8Aevf1DFU/pHwEMqIfuflThZXOuMC8TgdJ2Nz29U1BT6GUlzsA2BMd+PCzx2D 02iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PaHVZGKWkgPyFWZVLZ30IL4qTsvzfUog7s6zozmAECk=; b=ivgEEhwCStp/Ryhg3ziJvdUgSfizhXZF3VnJl3iEmo/OxU58NWkPkYGCyeoDdlNohC Ezyhv6VVdS0uSJIC4pIeTcOWg0gEb55MiyK0C79BJCdH5IaDNROD8HeQbPYlM7Sf+tuN SU2MvIVDJGApeqgF4pIWpOqraxxk8rm3a/Sc0DqKgypOx/bDJ/t5I+bHaT2uGyqcxLIZ gXHgdSCKtXiNgHFmGJO8tM6D1dj0KocxLIGM3N+EcuLCtU56eNzmW97xVwajrVJOVgqL HYvhK16aUq7mWCc3xcG/1FhK37c1nGhUsld2IwwFGUAKbWvOUpOsk4fUNqpGwLod2Dtr C9FQ== X-Gm-Message-State: AOAM5303gWZqfj9iJvGs5A7E0+fXQBKN9alAoA7P9LjoJBYt5Qz4dGDA pnlIiwe8dH01RQuLT5/R9IMd2nD45iiZo/PGHHA= X-Google-Smtp-Source: ABdhPJx4OD/+1LXbkpSuL4Bvb7fIVgvJcjbTiFGR8YFgJ9QhKltTXdRVawLf2METvN+cmWUn7cTm/dRF5lqoE7rIn0A= X-Received: by 2002:a62:b415:0:b029:2f4:829f:e483 with SMTP id h21-20020a62b4150000b02902f4829fe483mr11418521pfn.4.1624123907041; Sat, 19 Jun 2021 10:31:47 -0700 (PDT) In-Reply-To: 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:208761 Archived-At: On Sat, Jun 19, 2021 at 10:24 AM Stefan Monnier wrote: > In that case, `key-binding` might be a good replacement. > I see that using `key-binding` could find flyspell's own binding, tho, so we > should probably use the (first) patch below instead. > > Tho I also wonder why we do the lookup when flyspell is enabled instead > of doing directly in flyspell-auto-correct-word as in the second > patch below. Indeed, while I was looking into this some more, I saw that `flyspell-auto-correct-word' is bound to both `M-TAB' and `C-.' in `flyspell-mode-map'. Your second patch should properly delegate to the right command for either binding, which would be very nice. The original code (and my patch) always act as though you typed `M-TAB' when delegating, which isn't quite right.