From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#20528: 25.0.50; `keymap' property to work for symbol-value, not just symbol-function Date: Fri, 8 May 2015 08:25:58 -0700 (PDT) Message-ID: <2b90d00b-d8b9-463e-a6e1-e60f0f391a3e@default> References: <87twvntvz5.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1431098845 20657 80.91.229.3 (8 May 2015 15:27:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 May 2015 15:27:25 +0000 (UTC) Cc: 20528@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 08 17:27:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqkBE-0002if-Bb for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 May 2015 17:27:12 +0200 Original-Received: from localhost ([::1]:56326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqkBD-0001Nt-MR for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 May 2015 11:27:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqkBA-0001Nm-7A for bug-gnu-emacs@gnu.org; Fri, 08 May 2015 11:27:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqkB5-00028e-2f for bug-gnu-emacs@gnu.org; Fri, 08 May 2015 11:27:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqkB4-00028U-VR for bug-gnu-emacs@gnu.org; Fri, 08 May 2015 11:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YqkB4-0000T3-FT for bug-gnu-emacs@gnu.org; Fri, 08 May 2015 11:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 May 2015 15:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20528 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20528-submit@debbugs.gnu.org id=B20528.14310987711731 (code B ref 20528); Fri, 08 May 2015 15:27:02 +0000 Original-Received: (at 20528) by debbugs.gnu.org; 8 May 2015 15:26:11 +0000 Original-Received: from localhost ([127.0.0.1]:38907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YqkAF-0000Rq-1W for submit@debbugs.gnu.org; Fri, 08 May 2015 11:26:11 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:26905) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YqkAD-0000Ra-GH for 20528@debbugs.gnu.org; Fri, 08 May 2015 11:26:10 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t48FQ0w7009413 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 May 2015 15:26:01 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t48FPxRL027535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 8 May 2015 15:25:59 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t48FPxlY005038; Fri, 8 May 2015 15:25:59 GMT In-Reply-To: <87twvntvz5.fsf@igel.home> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102595 Archived-At: > > Please allow it to also be a symbol, such as `Info-mode-map', > > whose `symbol-value' is a keymap. It is used only as a keymap. > > It is not used as a function. It is convenient to be able to > > reuse an existing keymap variable to provide a map for a given > > portion of text. >=20 > Why can't you dereference the variable when assigning the property? Why can't you dereference the function symbol when assigning the property? ;-) As I said, it is used here only as a keymap, not as a function. But the real reason is that I want to have `C-u C-x =3D' show the variable name, not the raw keymap value (after [Show]). In my version, clicking that name then provides a human-readable description of the keymap (from command `describe-keymap'). Anyway, my guess about requiring C code modification was wrong. I've done what I wanted now, locally. You can do likewise for Emacs, if you want. Or not. The descr-text.el code is here: http://www.emacswiki.org/emacs/download/descr-text%2b.el Command `describe-keymap' is here: http://www.emacswiki.org/emacs/download/help-fns%2b.el All that's needed is to add a `help-keymap' button, and to use that in `describe-property-list' for a keymap variable. And to have `describe-text-sexp' use action `describe-keymap' for a keymap var.=20 Then, when you click on the keymap var name from `C-u C-x =3D', you get a readable description of the keymap for that `keymap' or `local-map' property. Properties `keymap' and `local-map' are as important as properties such as `face' for `what-cursor-position' output, and they too can provide useful info here, if you let them.