From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#25505: 24.5; doc of `define-minor-mode': incorrect for :keymap Date: Sat, 25 Sep 2021 09:12:20 -0700 Message-ID: References: <8737flmxr3.fsf@users.sourceforge.net> 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="8823"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 25505@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 25 18:14:00 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 1mUAJL-000270-6g for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 18:13:59 +0200 Original-Received: from localhost ([::1]:41542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUAJK-0003gG-6C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 12:13:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUAIR-0002XB-6k for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 12:13:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUAIQ-0005IY-Vy for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 12:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUAIQ-0000vL-Ra for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 12:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2021 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25505 X-GNU-PR-Package: emacs Original-Received: via spool by 25505-submit@debbugs.gnu.org id=B25505.16325863493415 (code B ref 25505); Sat, 25 Sep 2021 16:13:02 +0000 Original-Received: (at 25505) by debbugs.gnu.org; 25 Sep 2021 16:12:29 +0000 Original-Received: from localhost ([127.0.0.1]:34458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUAHs-0000t0-L8 for submit@debbugs.gnu.org; Sat, 25 Sep 2021 12:12:28 -0400 Original-Received: from mail-pg1-f171.google.com ([209.85.215.171]:34814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUAHq-0000sY-9V for 25505@debbugs.gnu.org; Sat, 25 Sep 2021 12:12:26 -0400 Original-Received: by mail-pg1-f171.google.com with SMTP id f129so13087766pgc.1 for <25505@debbugs.gnu.org>; Sat, 25 Sep 2021 09:12:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=JGPBohI/s8tyNt4OHeGLakW/E/Jqzc2uPpxX09aY7sw=; b=izjeCvOGdU5lplro6FQ8H+vE4PJ5rEAlQEA9du6KuT8Cpm3OeBIuhmvTdMMmEv2gfa JKAXQ1inbHWMCbFy0Csr/icu/P7zoFOmnGh+O1fVDhpvvCVAlf/OrYMiPZzGDSQJjtYU AIaFpZRaIOIXTTHHSO7oPjeRNMzhM3r4AKDkszPGgtZ1LJUHe0IAmCtIBAKepEU5nK7Z UgZONjEXfq7rTY1lBxq/WH3kKry7DAFHiOFcw6bJGvEIVTM7U/NrqufgMDUssqlSXjnI 3D8UFKqrQaqiR4KWgWS0vgn2Ib+uM0bbjqiaiYmyX8lzxp/wHRe0ZQgqeLrnrhQMPEaH cq3w== X-Gm-Message-State: AOAM532c032ZR0rbrGelg81UY/pafn1hGrQBW7S115iWcWWunvi/PTJG +ZaXo8tgLIkY92F+7JsxmQf8G4d39lVHhtqj8go= X-Google-Smtp-Source: ABdhPJyEEyoNiMGSqx2FOakZ11atsOF7LEDsnIvJKrGncfYQvigT+nMBRBiWCWVlXatv2mq6PpRiu5oGrsHxZVHGg7Y= X-Received: by 2002:a62:cd0f:0:b0:447:b8fe:d6c2 with SMTP id o15-20020a62cd0f000000b00447b8fed6c2mr15315376pfg.70.1632586340479; Sat, 25 Sep 2021 09:12:20 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 25 Sep 2021 09:12:20 -0700 In-Reply-To: <8737flmxr3.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Fri, 10 Feb 2017 18:28:32 -0500") 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:215470 Archived-At: tags 25505 fixed close 25505 28.1 thanks npostavs@users.sourceforge.net writes: > tags 25505 notabug > quit > > Drew Adams writes: > >> For :keymap, the doc string says "Same as the KEYMAP argument." >> Similarly the doc in (elisp) `Defining Minor Modes'. This does not >> appear to be correct. >> >> For positional arg KEYMAP, the doc string says: >> >> If non-nil, it should be a variable name (whose value is a keymap), >> or an expression that returns either a keymap or a list of >> arguments for `easy-mmode-define-keymap'. >> ... >> >> But the value of :keymap apparently cannot be a variable name whose >> value is a keymap or an expression that evaluates to a keymap. The >> :keymap value you pass is apparently not evaluated - unlike other >> keyword values such as :group. > > The doc says "variable name" as opposed to "expression", I think it's > clear that expression will be evaluated, and something which is not an > expression will not be evaluated. I guess we could add "it should be an > unquoted variable name..." (Noam asked for suggestions here years ago, but there have been none.) Having read this bug report, I think "unquoted variable name" fixes the confusion here, so I've made that change on master (commit 293b8c71b2). This change will be a part of the upcoming Emacs 28.1. I'm consequently closing this bug report.