From unknown Sat Aug 16 23:46:50 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4393: 23.1; doc string of accessible-keymaps Reply-To: "Drew Adams" , 4393@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Sep 2009 23:40:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4393 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125262549324593 (code B ref -1); Thu, 10 Sep 2009 23:40:16 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 23:31:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8ANVVJ7024590 for ; Thu, 10 Sep 2009 16:31:32 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mlt6x-0003i3-5o for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mlt6q-0003hX-CL for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:30 -0400 Received: from [199.232.76.173] (port=45083 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlt6q-0003hU-8E for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:24 -0400 Received: from acsinet12.oracle.com ([141.146.126.234]:44623) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mlt6p-0002qY-P1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:24 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8ANUaqo000361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Sep 2009 23:30:37 GMT Received: from abhmt006.oracle.com (abhmt006.oracle.com [141.146.116.15]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8ANVUml028333 for ; Thu, 10 Sep 2009 23:31:30 GMT Received: from dradamslap1 (/141.144.80.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 10 Sep 2009 16:31:16 -0700 From: "Drew Adams" To: Date: Thu, 10 Sep 2009 16:31:14 -0700 Message-ID: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acoybsnmcb/jjwf1Qy+ebVp1187Cuw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt006.oracle.com [141.146.116.15] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4AA98C45.00EE:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) emacs -Q In *scratch* type this: (accessible-keymaps (current-global-map)) Put point after the sexp, and do `C-u C-x C-e'. You get the eval result inserted just after the sexp. The result has a mouse-face property (highlight). Put point at the beginning of the result (just after the initial sexp). Hit RET - the display of the result changes between full and abbreviated. An aside: it took me a while to figure out what was happening, and why RET didn't insert a newline here. (You can't use C-j to insert a newline in *scratch*, so I'm in the habit of hitting RET.) I wonder if something shouldn't be added to the doc for C-x C-e about this. There is nothing that prepares the user for the effect (highlighted sexp, hijacked mouse-2 behavior, so you can no longer yank into the sexp, hijacked RET behavior, so you cannot shorten lines, etc.). And there should be some explanation of how to turn OFF this wonderful highlighting and RET/mouse-2 behavior. Since it seems to be C-x C-e that has this effect, it is the doc of C-x C-e that should cover this. Anyway, on to the bug... Search for [f2] in the result sexp. You'll find this: ([f2] . t). That's one of the entries in the alist returned by `accessible-keymaps'. There are two other entries with cdr = t: ([24 11] . t) and ([24 54] . t). All the other entries have a keymap as cdr. However, the doc string of `accessible-keymaps' says this: "Returns a list of elements of the form (KEYS . MAP), where the sequence KEYS starting from keymap gets you to MAP." You'll note that it doesn't tell you what MAP is. But you could presume that MAP would be a keymap, since the doc string also says, "Find all keymaps accessible...". However, (keymapp t) returns nil; `t' is not a keymap. The doc needs to make clear what MAP is. In particular, it needs to explain that it is not necessarily a keymap. It should perhaps explain what `t' means as a value for MAP, or at least point you to the manual section that explains it (which section is it?). I searched the Elisp manual for some possibility of a keymap being just `t', but I didn't find anything related to this. The manual says clearly that a keymap is a cons whose car is `keymap' and whose cdr... `t' is not a cons with car `keymap'. The doc for `keymapp' says, similarly, that a keymap must be a cons with car `keymap'. So at a minimum there is a doc bug here (for `accessible-keymaps', at least). I wonder too if there isn't a code bug - is it correct for the MAP of an entry to be `t'? In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' From unknown Sat Aug 16 23:46:50 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4393: 23.1; doc string of accessible-keymaps Reply-To: Stefan Monnier , 4393@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Sep 2009 02:15:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4393 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4393-submit@emacsbugs.donarmstrong.com id=B4393.125263479220674 (code B ref 4393); Fri, 11 Sep 2009 02:15:06 +0000 Received: (at 4393) by emacsbugs.donarmstrong.com; 11 Sep 2009 02:06:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.pppoe.ca [206.248.154.183] (may be forged)) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8B26Utq020663 for <4393@emacsbugs.donarmstrong.com>; Thu, 10 Sep 2009 19:06:32 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkEAOBNqUpFpZBe/2dsb2JhbACBU90HhBgFh20 X-IronPort-AV: E=Sophos;i="4.44,367,1249272000"; d="scan'208";a="45549650" Received: from 69-165-144-94.dsl.teksavvy.com (HELO pastel.home) ([69.165.144.94]) by ironport2-out.pppoe.ca with ESMTP; 10 Sep 2009 22:04:54 -0400 Received: by pastel.home (Postfix, from userid 20848) id DBA167F87; Thu, 10 Sep 2009 22:06:24 -0400 (EDT) From: Stefan Monnier To: Drew Adams Cc: 4393@debbugs.gnu.org, Message-ID: References: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> Date: Thu, 10 Sep 2009 22:06:24 -0400 In-Reply-To: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> (Drew Adams's message of "Thu, 10 Sep 2009 16:31:14 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > (accessible-keymaps (current-global-map)) [...] > Search for [f2] in the result sexp. You'll find this: > ([f2] . t). That's one of the entries in the alist returned by > `accessible-keymaps'. > There are two other entries with cdr = t: ([24 11] . t) and > ([24 54] . t). All the other entries have a keymap as cdr. It turns out that these are prefixes bound to autoloaded keymaps that haven't yet been loaded (and they also happen to be the same keymap). `accessible-keymaps' does not autoload keymaps. I guess it should return ([f2] . 2C-command) and ([24 54] . 2C-command). Stefan From unknown Sat Aug 16 23:46:50 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4393: 23.1; doc string of accessible-keymaps Reply-To: "Drew Adams" , 4393@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Sep 2009 14:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4393 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125267905928738 (code B ref -1); Fri, 11 Sep 2009 14:30:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 11 Sep 2009 14:24:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BEOHNa028734 for ; Fri, 11 Sep 2009 07:24:18 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm72u-00026e-WE for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 10:24:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm72q-00022J-RB for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 10:24:16 -0400 Received: from [199.232.76.173] (port=42855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm72q-000224-JJ for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 10:24:12 -0400 Received: from acsinet12.oracle.com ([141.146.126.234]:60728) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mm72p-0003Wk-VA for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2009 10:24:12 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8BENFZh005547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Sep 2009 14:23:17 GMT Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8BEOAhk012651; Fri, 11 Sep 2009 14:24:11 GMT Received: from dradamslap1 (/141.144.80.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Sep 2009 07:23:55 -0700 From: "Drew Adams" To: "'Stefan Monnier'" Cc: <4393@debbugs.gnu.org>, References: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> Date: Fri, 11 Sep 2009 07:23:53 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcoyhK80jeasCJVQSd681LKcf1VoFwAZfGLQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt013.oracle.com [141.146.116.22] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4AAA5D7C.016C:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) > > (accessible-keymaps (current-global-map)) > [...] > > Search for [f2] in the result sexp. You'll find this: > > ([f2] . t). That's one of the entries in the alist returned by > > `accessible-keymaps'. > > There are two other entries with cdr = t: ([24 11] . t) and > > ([24 54] . t). All the other entries have a keymap as cdr. > > It turns out that these are prefixes bound to autoloaded keymaps that > haven't yet been loaded (and they also happen to be the same keymap). > `accessible-keymaps' does not autoload keymaps. I guess it should > return ([f2] . 2C-command) and ([24 54] . 2C-command). OK, so if I understand right, this is not a lack of explanation in the doc of accessible-keymaps, but is a code bug that will be fixed. From unknown Sat Aug 16 23:46:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: "Drew Adams" Subject: bug#4393 closed by Stefan Monnier (Re: bug#4393: 23.1; doc string of accessible-keymaps) Message-ID: References: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> X-Emacs-PR-Message: they-closed 4393 X-Emacs-PR-Package: emacs Reply-To: 4393@debbugs.gnu.org Date: Fri, 11 Sep 2009 19:30:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1252697404-11422-1" This is a multi-part message in MIME format... ------------=_1252697404-11422-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #4393: 23.1; doc string of accessible-keymaps It has been closed by Stefan Monnier . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Stefan Monnier by replying to this email. --=20 4393: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4393 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1252697404-11422-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4393-done) by emacsbugs.donarmstrong.com; 11 Sep 2009 19:21:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.1 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from tomts10-srv.bellnexxia.net (tomts10.bellnexxia.net [209.226.175.54]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BJLaqX010183 for <4393-done@emacsbugs.donarmstrong.com>; Fri, 11 Sep 2009 12:21:38 -0700 Received: from toip7.srvr.bell.ca ([209.226.175.124]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20090911192136.YTVB12711.tomts10-srv.bellnexxia.net@toip7.srvr.bell.ca> for <4393-done@emacsbugs.donarmstrong.com>; Fri, 11 Sep 2009 15:21:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwFAJw6qkpGN458/2dsb2JhbACBU9wLhBgF Received: from bas1-montreal42-1178046076.dsl.bell.ca (HELO ceviche.home) ([70.55.142.124]) by toip7.srvr.bell.ca with ESMTP; 11 Sep 2009 15:24:48 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 15084B40D4; Fri, 11 Sep 2009 15:21:36 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#4393: 23.1; doc string of accessible-keymaps Message-ID: References: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> Date: Fri, 11 Sep 2009 15:21:35 -0400 In-Reply-To: (Drew Adams's message of "Fri, 11 Sep 2009 07:23:53 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> > (accessible-keymaps (current-global-map)) >> [...] >> > Search for [f2] in the result sexp. You'll find this: >> > ([f2] . t). That's one of the entries in the alist returned by >> > `accessible-keymaps'. >> > There are two other entries with cdr = t: ([24 11] . t) and >> > ([24 54] . t). All the other entries have a keymap as cdr. >> >> It turns out that these are prefixes bound to autoloaded keymaps that >> haven't yet been loaded (and they also happen to be the same keymap). >> `accessible-keymaps' does not autoload keymaps. I guess it should >> return ([f2] . 2C-command) and ([24 54] . 2C-command). > OK, so if I understand right, this is not a lack of explanation in the doc of > accessible-keymaps, but is a code bug that will be fixed. Actually, I believe I fixed it yesterday with the below, Stefan Index: src/keymap.c =================================================================== RCS file: /sources/emacs/emacs/src/keymap.c,v retrieving revision 1.384 retrieving revision 1.385 diff -u -r1.384 -r1.385 --- src/keymap.c 11 Sep 2009 00:59:05 -0000 1.384 +++ src/keymap.c 11 Sep 2009 02:14:07 -0000 1.385 @@ -292,7 +292,7 @@ goto autoload_retry; } else - return Qt; + return object; } } } ------------=_1252697404-11422-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 23:31:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8ANVVJ7024590 for ; Thu, 10 Sep 2009 16:31:32 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mlt6x-0003i3-5o for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mlt6q-0003hX-CL for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:30 -0400 Received: from [199.232.76.173] (port=45083 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlt6q-0003hU-8E for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:24 -0400 Received: from acsinet12.oracle.com ([141.146.126.234]:44623) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mlt6p-0002qY-P1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 19:31:24 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8ANUaqo000361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Sep 2009 23:30:37 GMT Received: from abhmt006.oracle.com (abhmt006.oracle.com [141.146.116.15]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8ANVUml028333 for ; Thu, 10 Sep 2009 23:31:30 GMT Received: from dradamslap1 (/141.144.80.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 10 Sep 2009 16:31:16 -0700 From: "Drew Adams" To: Subject: 23.1; doc string of accessible-keymaps Date: Thu, 10 Sep 2009 16:31:14 -0700 Message-ID: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acoybsnmcb/jjwf1Qy+ebVp1187Cuw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt006.oracle.com [141.146.116.15] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4AA98C45.00EE:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) emacs -Q In *scratch* type this: (accessible-keymaps (current-global-map)) Put point after the sexp, and do `C-u C-x C-e'. You get the eval result inserted just after the sexp. The result has a mouse-face property (highlight). Put point at the beginning of the result (just after the initial sexp). Hit RET - the display of the result changes between full and abbreviated. An aside: it took me a while to figure out what was happening, and why RET didn't insert a newline here. (You can't use C-j to insert a newline in *scratch*, so I'm in the habit of hitting RET.) I wonder if something shouldn't be added to the doc for C-x C-e about this. There is nothing that prepares the user for the effect (highlighted sexp, hijacked mouse-2 behavior, so you can no longer yank into the sexp, hijacked RET behavior, so you cannot shorten lines, etc.). And there should be some explanation of how to turn OFF this wonderful highlighting and RET/mouse-2 behavior. Since it seems to be C-x C-e that has this effect, it is the doc of C-x C-e that should cover this. Anyway, on to the bug... Search for [f2] in the result sexp. You'll find this: ([f2] . t). That's one of the entries in the alist returned by `accessible-keymaps'. There are two other entries with cdr = t: ([24 11] . t) and ([24 54] . t). All the other entries have a keymap as cdr. However, the doc string of `accessible-keymaps' says this: "Returns a list of elements of the form (KEYS . MAP), where the sequence KEYS starting from keymap gets you to MAP." You'll note that it doesn't tell you what MAP is. But you could presume that MAP would be a keymap, since the doc string also says, "Find all keymaps accessible...". However, (keymapp t) returns nil; `t' is not a keymap. The doc needs to make clear what MAP is. In particular, it needs to explain that it is not necessarily a keymap. It should perhaps explain what `t' means as a value for MAP, or at least point you to the manual section that explains it (which section is it?). I searched the Elisp manual for some possibility of a keymap being just `t', but I didn't find anything related to this. The manual says clearly that a keymap is a cons whose car is `keymap' and whose cdr... `t' is not a cons with car `keymap'. The doc for `keymapp' says, similarly, that a keymap must be a cons with car `keymap'. So at a minimum there is a doc bug here (for `accessible-keymaps', at least). I wonder too if there isn't a code bug - is it correct for the MAP of an entry to be `t'? In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' ------------=_1252697404-11422-1-- From unknown Sat Aug 16 23:46:50 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4393: 23.1; doc string of accessible-keymaps Reply-To: "Drew Adams" , 4393@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Sep 2009 20:30:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4393 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4393-submit@emacsbugs.donarmstrong.com id=B4393.125270048720299 (code B ref 4393); Fri, 11 Sep 2009 20:30:05 +0000 Received: (at 4393) by emacsbugs.donarmstrong.com; 11 Sep 2009 20:21:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from acsinet11.oracle.com (acsinet11.oracle.com [141.146.126.233]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BKLPBI020281 for <4393@emacsbugs.donarmstrong.com>; Fri, 11 Sep 2009 13:21:26 -0700 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8BKMNop015927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Sep 2009 20:22:24 GMT Received: from abhmt014.oracle.com (abhmt014.oracle.com [141.146.116.23]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8BKLWNR024898; Fri, 11 Sep 2009 20:21:32 GMT Received: from dradamslap1 (/141.144.82.132) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Sep 2009 13:21:16 -0700 From: "Drew Adams" To: "'Stefan Monnier'" , <4393@debbugs.gnu.org> References: <5AEE0882D73D443C9293E91EDEB9C00B@us.oracle.com> Date: Fri, 11 Sep 2009 13:21:16 -0700 Message-ID: <9418325059804837B399C76677AEE3D9@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcozFTy/Sm9nXLJ/R4iwLZxl7OqtcwABsaeg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 In-Reply-To: X-Source-IP: abhmt014.oracle.com [141.146.116.23] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4AAAB13D.0123:SCFSTAT5015188,ss=1,fgs=0 > Actually, I believe I fixed it yesterday with the below, Great; thanks. Looking forward to it. Unfortunately, this bug is also in Emacs 22, so version-agnostic code will still need to filter with (when (keymapp x)...). FYI, it's not a problem before Emacs 22. Thx - Drew