From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Hong Xu Newsgroups: gmane.emacs.bugs Subject: bug#30958: 26.0.91; No documentation for key and value in the function passed to `map-keymap' Date: Tue, 27 Mar 2018 01:07:33 -0700 Message-ID: References: <4f0b5f4f-74bd-5610-0cff-14da7ca90f39@topbug.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9uaEIjt0OWh08OnEJd5KIL4hCKzaLsyV5" X-Trace: blaine.gmane.org 1522137983 13312 195.159.176.226 (27 Mar 2018 08:06:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2018 08:06:23 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: Drew Adams , 30958@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 27 10:06:19 2018 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 1f0jcY-0003Ii-1y for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Mar 2018 10:06:18 +0200 Original-Received: from localhost ([::1]:60964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0jeZ-0008Km-Bc for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Mar 2018 04:08:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0jeK-0008Jx-Qp for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2018 04:08:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0jeG-0005sb-KK for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2018 04:08:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0jeG-0005sL-EM for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2018 04:08:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f0jeE-0001OW-2M for bug-gnu-emacs@gnu.org; Tue, 27 Mar 2018 04:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hong Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Mar 2018 08:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30958-submit@debbugs.gnu.org id=B30958.15221380665339 (code B ref 30958); Tue, 27 Mar 2018 08:08:02 +0000 Original-Received: (at 30958) by debbugs.gnu.org; 27 Mar 2018 08:07:46 +0000 Original-Received: from localhost ([127.0.0.1]:55118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0jdy-0001O3-BE for submit@debbugs.gnu.org; Tue, 27 Mar 2018 04:07:46 -0400 Original-Received: from sender-of-o52.zoho.com ([135.84.80.217]:21326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0jdv-0001Nt-Tn for 30958@debbugs.gnu.org; Tue, 27 Mar 2018 04:07:44 -0400 Original-Received: from [192.168.88.88] (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 152213805830966.70242756906498; Tue, 27 Mar 2018 01:07:38 -0700 (PDT) In-Reply-To: X-Zoho-Virus-Status: 1 X-ZohoMailClient: External 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:144648 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9uaEIjt0OWh08OnEJd5KIL4hCKzaLsyV5 Content-Type: multipart/mixed; boundary="rbQGhaaGLARx7pUFMwFKBFiR8rPEMbQtU"; protected-headers="v1" From: Hong Xu To: Drew Adams , 30958@debbugs.gnu.org Message-ID: Subject: Re: bug#30958: 26.0.91; No documentation for key and value in the function passed to `map-keymap' References: <4f0b5f4f-74bd-5610-0cff-14da7ca90f39@topbug.net> In-Reply-To: --rbQGhaaGLARx7pUFMwFKBFiR8rPEMbQtU Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 03/26/2018 09:15 PM, Drew Adams wrote: >> A callback function should be passed to `map-keymap'. However, >> the description of the callback function seems to be missing >> (undocumented). For example, the value does not seems to always be a >> function. It is sometimes an alist, sometimes a more complicated list.= >> >> I think this might have never been documented. If it is documented, it= >> would be greatly appreciated if a pointer to the actual documentation >> can be added to the document of `map-keymap'. >=20 > (If this report is clear to others then don't worry about it, > but it's not clear to me.) >=20 > I wouldn't call the FUNCTION arg a "callback" function, but > it's the only function that is passed, AFAIK, so I guess > that's the one you mean. >=20 > What makes you think it doesn't always need to be a function? > Grepping the Emacs Lisp files, I don't see any cases where it > is not a function (or where the KEYMAP arg is a function). >=20 > FUNCTION is described pretty well in the doc, I think - the > args it is passed are described. >=20 > If you instead meant the KEYMAP arg (whose value is not a > function, AFAIK), then there is a whole section of the Elisp > manual devoted do describing that, including the various > forms a keymap can take (e.g. particular kinds of alists). >=20 > See https://www.gnu.org/software/emacs/manual/html_node/elisp/Keymaps.h= tml > and its child nodes. >=20 > (I'm probably missing something that you meant. If so, > please ignore.) >=20 Thanks for your reply and sorry for the confusion -- I wrote those in a hurry. What is confusing in the current document, IMO, is the VALUE arg of the FUNCTION arg of `map-keymap'. The document reads: "It passes two arguments, the event type and the value of the binding." However, I searched the document, and could not find any useful information regarding the value of the binding. According to my own experiments, in most cases, it is a function, but sometimes it is an alist, or keymap, or of other types. I guess this may be obvious to many of you and may be documented somewhere, but a link to those is somehow missing; or it may be completely undocumented. I would appreciate it if the value of the binding is well documented (or a link to it is added). --rbQGhaaGLARx7pUFMwFKBFiR8rPEMbQtU-- --9uaEIjt0OWh08OnEJd5KIL4hCKzaLsyV5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEExhpJYaW1K1QSOB5eJmx9M4IvhHgFAlq5+8kACgkQJmx9M4Iv hHjFFhAAvqhi9kiqefmsLJqbrbW/XKcsXolhjY8kX56GRjRmuv4a0q3+BLKf4meK lufNq48ZQidCM0sbkPH4ZEn8qvH0Z7NQAAIKiwWCIzWCRqWCnPW1yNWTpAaa5zYN WRmlEBODJi09vQ65Wd/YEu/zDkW1hYMhuHH7E5wNriMXFV4X8xnTR9G7Jpj2UWhb NIzrnIpeeZM/ZWCppHKxHZ5LvrkkRN4MCMStYSzU71cQ/0xC+VGowmPYt+jqyUFD 6xlxZGqlnokO69QkELpXWum7cwI1v/q4lgbFrnH3qxA3FscVcf8Fm6ZPe5LCZmpn hKW82hvhhYUCaXFXgfAjWec00ne9tXsy6iTGxUIS4Z8CWT9tYPfZ8S3N7TBjApni hUNcC2URMJfRg8A3kxVeIg2+7NscankA2ciIvu6zTq2buOz/5m5Bu2mBgPPZ2ZW/ IvVuNYhs23fXDNqutethtowONSfDguktbSO4sZ6sDmxthD4wn4L4mZqTdzyEuGNC 0l4fN5H65b5ZVTuEEMvR0Ylhwui8IzbSYwY7KVJsDOUeWwvVbljfZNP6oGRpav8q p8kGtW0/HYwcGsoodLtmSvIyr5BA4aMC0qW78oox+1FDnzEkpchDimvFhNi28KcX oI1GVkqsZjXrPP1WLL0D/5OvLW/27zT0eyrVrMdMBAWV++sjgZU= =+3+c -----END PGP SIGNATURE----- --9uaEIjt0OWh08OnEJd5KIL4hCKzaLsyV5--