From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#51384: 28.0.60; substitute-command-keys finds global binding for undo instead of in specified keymap Date: Tue, 20 Sep 2022 18:41:45 +0200 Message-ID: <87v8pic81i.fsf@gmail.com> References: <877de1s9yl.fsf@gmail.com> <87o87d9zpv.fsf@igel.home> <87y26hqtgt.fsf@gmail.com> <8635nxcow3.fsf@mail.linkov.net> <87czn1nwdr.fsf@gmail.com> <871qsd4xnj.fsf@gnus.org> <877d25krwg.fsf@gmail.com> <87wna3y8eh.fsf@gnus.org> <87fsgriqt1.fsf@gmail.com> <874jx7y705.fsf@gnus.org> <875yhidp47.fsf@gmail.com> <87fsgmavsm.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6304"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , 51384@debbugs.gnu.org, Andreas Schwab , Juri Linkov To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 20 23:38:14 2022 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 1oakwY-0001SC-Me for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 23:38:14 +0200 Original-Received: from localhost ([::1]:48134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oakwX-0000Cj-F3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Sep 2022 17:38:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oagJu-0004j8-Cl for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 12:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oagJt-0003TJ-Sf for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 12:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oagJt-0001oa-N0 for bug-gnu-emacs@gnu.org; Tue, 20 Sep 2022 12:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 16:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 51384-submit@debbugs.gnu.org id=B51384.16636921196968 (code B ref 51384); Tue, 20 Sep 2022 16:42:01 +0000 Original-Received: (at 51384) by debbugs.gnu.org; 20 Sep 2022 16:41:59 +0000 Original-Received: from localhost ([127.0.0.1]:59479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oagJr-0001oK-C9 for submit@debbugs.gnu.org; Tue, 20 Sep 2022 12:41:59 -0400 Original-Received: from mail-wr1-f50.google.com ([209.85.221.50]:38600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oagJl-0001o3-M8 for 51384@debbugs.gnu.org; Tue, 20 Sep 2022 12:41:57 -0400 Original-Received: by mail-wr1-f50.google.com with SMTP id b5so5255803wrr.5 for <51384@debbugs.gnu.org>; Tue, 20 Sep 2022 09:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=Bp7+WW0uQ1jzCRLwxVeNaU0LyIJAhpRhr4u8Fqm91ko=; b=Xrlr8R82WyWVnnW60t2F7oq6PmFwIR7rwdj0otiu7OSy0Gi8AUlmj8mNXduqmdZPkO 40PzhfFmYMPYhw9Dml2uEMXlhusUG8/xZd6zTnuqEagPwTqP9qXJ4S8k+fotumpBm/4n pSeUQAoWGFrU2nIpRZlGmGrEIyZtKcTm8TfMz5bXAQnjnxARlNEXERKtRtDUbANagqEF GGQIdi1jEuRooMLcof1MtQJ8sYlrtoqQaxxk6Lx+scnxgu/5yVVuZ3kBIrK3dpqLzQvK 1HrzaBxN5O/mPrboxCm8PWSK3WBoT8hJ58G3xXBM6KcBl1K9hJmo80w4sLIOuvvreAB/ hwBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=Bp7+WW0uQ1jzCRLwxVeNaU0LyIJAhpRhr4u8Fqm91ko=; b=DtvrdlLSBUd0T+5HmaZnSgZMGTQVtJeS0zBKc//d407cf8Il1IB13baNaBnrQUTezF 9zcs7Q9mnlFArhAsj4pShx80I7lUpbh530OsutMXSNi7J+8tFZN1gN3BQDF1Y17mZuGq DkU5K31hq6uyU7b1/xX33IRypKMLFPQJHTZTz+A43TizpBgrGRzAIOD9f6hoklIRWi+o Te9BhkVaQdsN459SaeDnK66GsFkIpn2caiKALslF6CcZ3Mlt/IAZ3HSameFPoc48PSCa i40D7RHTMet5Bm7iBOdnIsEJN+2IQ0t4rgSJtP6vGvZDiRWAN/bHnITTwenMhWDZEBhn xIFA== X-Gm-Message-State: ACrzQf1QVzPP7n0wkEdLenOHGRmE/D526BWQ+wJy1MAPJyUMjUPnfBAD /GCGfQn2Dqfc/47pe4dmffs= X-Google-Smtp-Source: AMsMyM5vG3NP95afmQrhr6N5ZREqG1utxF8I8E+wZVilyVauaHV9/OKCZPNUxcEJWeuyhHo9d3B1qw== X-Received: by 2002:a05:6000:1b92:b0:220:7d86:2e30 with SMTP id r18-20020a0560001b9200b002207d862e30mr15232936wru.530.1663692106793; Tue, 20 Sep 2022 09:41:46 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:16a0:9848:d23c:7dcb]) by smtp.gmail.com with ESMTPSA id c7-20020adffb47000000b00226dfac0149sm135561wrs.114.2022.09.20.09.41.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 09:41:46 -0700 (PDT) In-Reply-To: <87fsgmavsm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 20 Sep 2022 17:51:37 +0200") 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:243234 Archived-At: >>>>> On Tue, 20 Sep 2022 17:51:37 +0200, Lars Ingebrigtsen said: Lars> 1 unexpected results: Lars> FAILED help-tests-substitute-command-keys/keymap-change That=CA=BCs doing (test "\\\\[abort-recursive-edit]" "C-]") and abort-recursive-edit is in the global-map, and not minibuffer-local-must-match-map. Oops. This fixes it. If that looks ok I=CA=BCll push later tonight. diff --git a/lisp/help.el b/lisp/help.el index 0ec5b9c85b..b4b9120da3 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1208,6 +1208,12 @@ substitute-command-keys (and keymap (list keymap)) t)))) + ;; If we're looking in a particular keymap which has + ;; no binding, then we need to redo the lookup, with + ;; the global map as well this time. + (when (and (not key) keymap) + (setq key (with-current-buffer orig-buf + (where-is-internal fun keymap t)))) (if (not key) ;; Function is not on any key. (let ((op (point)))