From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64417: 30.0.50; keymap-unset :REMOVE keyword not working Date: Sun, 02 Jul 2023 12:02:25 -0400 Message-ID: References: Reply-To: Stefan Monnier 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="4414"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64417@debbugs.gnu.org To: German Pacenza Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 02 18:03:19 2023 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 1qFzXi-0000uV-OO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jul 2023 18:03:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFzXU-0007l8-Dq; Sun, 02 Jul 2023 12:03:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFzXS-0007l0-QW for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFzXS-0001Mw-Hu for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFzXR-0007mg-WB for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2023 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64417 X-GNU-PR-Package: emacs Original-Received: via spool by 64417-submit@debbugs.gnu.org id=B64417.168831375929894 (code B ref 64417); Sun, 02 Jul 2023 16:03:01 +0000 Original-Received: (at 64417) by debbugs.gnu.org; 2 Jul 2023 16:02:39 +0000 Original-Received: from localhost ([127.0.0.1]:60931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFzX5-0007m6-H3 for submit@debbugs.gnu.org; Sun, 02 Jul 2023 12:02:39 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFzX0-0007lq-Td for 64417@debbugs.gnu.org; Sun, 02 Jul 2023 12:02:38 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 05CED441195; Sun, 2 Jul 2023 12:02:29 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 86A41441037; Sun, 2 Jul 2023 12:02:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1688313747; bh=ary3xRVhZi/clIsPBDNz63JAeedcuf9JW4mtk1EgWn0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Y622/AuLGk7cJolRk7jj2U0wr6vd5MMaLq7rdX2Ho9bC0rg4UAmcmffsKu/INnHAg r2coQQ0EQ6tq66KALcYbQ6hh7PSR8o6yxyj5swBLddI4wq8z67eS/zcs2pQAc1ULes rtspXxI0uGjvl/NrtWZ8ymewcscCWx2vSFW14C6ivx46hl1m9347Kl5JcnwgLaywfH Z9wl858o4JEVLmRzFxV3lItBt27iDMhT3TBzqesAD3r/WvpFbzncgB5/odFMWc+hPK rDrdSQNdYJt8Tjh4ySwiss9XGqnfss6bxC7IupEOMKx7X7n8Ce0uVoGXrZDTSxZcZo ZSQhYBYU7E+kg== Original-Received: from pastel (69-165-155-162.dsl.teksavvy.com [69.165.155.162]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6310D120208; Sun, 2 Jul 2023 12:02:27 -0400 (EDT) In-Reply-To: (German Pacenza's message of "Sun, 02 Jul 2023 08:46:28 -0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264490 Archived-At: > When I evaluate: > (keymap-unset diff-mode-map "M-SPC" :REMOVE) > M-SPC still runs scroll-up-command > > (keymap-unset diff-mode-map "M-SPC") > M-SPC is removed from diff-mode-map and cycle-spacing (global-mode-map) > is activated > > This contradicts the keymap-unset docstring: > > If REMOVE, remove the binding instead of unsetting it. This only > makes a difference when there=E2=80=99s a parent keymap. When unsetting > a key in a child map, it will still shadow the same key in the > parent keymap. Removing the binding will allow the key in the > parent keymap to be used. Thanks for providing a great example of why the `remove` arg of `keymap-unset` is a problematic feature :-) The technical reason for the above: while `diff-mode-map` has no parent, the keymap bound to ESC in `diff-mode-map` has `diff-mode-shared-map` as parent, and `M-SPC` is the same (for keymap purposes) as `ESC SPC`. Of curse, there's no binding of anything to `scroll-up-command` itself in `diff-mode-shared-map` itself: the binding is to be found in `diff-mode-shared-map`s parent, `special-mode-map`. So we can't *remove* the binding from `M-SPC` to `scroll-up-command` without modifying some other keymap. So, the code is doing The Right Thing :-( Stefan