From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#25505: 24.5; doc of `define-minor-mode': incorrect for :keymap Date: Sat, 21 Jan 2017 10:24:11 -0800 (PST) Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1485023143 31961 195.159.176.226 (21 Jan 2017 18:25:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2017 18:25:43 +0000 (UTC) To: 25505@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 21 19:25:34 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cV0Le-0005N6-VM for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jan 2017 19:25:11 +0100 Original-Received: from localhost ([::1]:32888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cV0Lg-0003k2-Of for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jan 2017 13:25:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cV0La-0003ij-EE for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:25:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cV0LX-0004In-AM for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:25:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39540) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cV0LX-0004Ie-6y for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cV0LW-0006wG-Ih for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2017 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25505 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.148502306826626 (code B ref -1); Sat, 21 Jan 2017 18:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2017 18:24:28 +0000 Original-Received: from localhost ([127.0.0.1]:37739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cV0Kx-0006vO-Pm for submit@debbugs.gnu.org; Sat, 21 Jan 2017 13:24:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cV0Kv-0006vB-NH for submit@debbugs.gnu.org; Sat, 21 Jan 2017 13:24:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cV0Kp-000449-Ia for submit@debbugs.gnu.org; Sat, 21 Jan 2017 13:24:20 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cV0Kp-000445-FD for submit@debbugs.gnu.org; Sat, 21 Jan 2017 13:24:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cV0Ko-0003hI-3x for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:24:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cV0Kl-00042V-0v for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:24:18 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:17845) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cV0Kk-00041f-Ml for bug-gnu-emacs@gnu.org; Sat, 21 Jan 2017 13:24:14 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0LIOCK2016836 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 21 Jan 2017 18:24:12 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0LIOB8a018306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 21 Jan 2017 18:24:12 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v0LIOAQA026411 for ; Sat, 21 Jan 2017 18:24:11 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128298 Archived-At: 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. So, for example, the `define-minor-mode' fr `follow-mode' uses this: :keymap follow-mode-map and not this: :keymap 'follow-mode-map and not this: (let ((mainmap (make-sparse-keymap)) (map (make-sparse-keymap))) (define-key map "\C-v"=09'follow-scroll-up) ... (define-key mainmap follow-mode-prefix map) (define-key mainmap [remap end-of-buffer] 'follow-end-of-buffer) ... mainmap) In fact, it is not clear from the doc whether and which keyword values are evaluated. And shouldn't they all be evaluated or else none be so? In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32'