GNU bug report logs - #54161
27.2; `define-minor-mode' with alist of key bindings

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 25 Feb 2022 17:49:02 UTC

Severity: normal

Found in version 27.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Gilles <gilles.usenet <at> gmail.com>
Cc: 54161 <at> debbugs.gnu.org
Subject: bug#54161: 27.2; `define-minor-mode' with alist of key bindings
Date: Tue, 01 Mar 2022 02:21:32 +0100
[Message part 1 (text/plain, inline)]
Gilles <gilles.usenet <at> gmail.com> writes:

> The Lisp *expression* (kbd "C-o") *returns* a suitable argument for
> define-key.

I think the small source of confusion is whether these arguments are
evaluated.  How about making that clearer, e.g.

[0001-WIP-Fix-54161.patch (text/x-diff, inline)]
From 73283a3a37a7df41a0a1ab9d88bcf31704e9e841 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Tue, 1 Mar 2022 02:13:14 +0100
Subject: [PATCH] WIP: Fix #54161

---
 lisp/emacs-lisp/easy-mmode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 688c76e0c5..b35be58b3a 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -168,9 +168,9 @@ define-minor-mode
                 If non-nil, it should be an unquoted variable name (whose value
                 is a keymap), or an expression that returns either a keymap or
 		a list of (KEY . BINDING) pairs where KEY and BINDING are
-		suitable for `define-key'.  If you supply a KEYMAP argument
-		that is not a symbol, this macro defines the variable MODE-map
-		and gives it the value that KEYMAP specifies.
+		suitable values for `define-key'.  If you supply a KEYMAP
+		argument that is not a symbol, this macro defines the
+		variable MODE-map and gives it the value that KEYMAP specifies.
 :interactive VAL  Whether this mode should be a command or not.  The default
                 is to make it one; use nil to avoid that.  If VAL is a list,
                 it's interpreted as a list of major modes this minor mode
--
2.30.2

[Message part 3 (text/plain, inline)]
BTW, should we fix the mixed indentation style in these lines (tabs
vs. spaces)?

Michael.


This bug report was last modified 3 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.