unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 20528@debbugs.gnu.org
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)	[thread overview]
Message-ID: <2b90d00b-d8b9-463e-a6e1-e60f0f391a3e@default> (raw)
In-Reply-To: <87twvntvz5.fsf@igel.home>

> > 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.
> 
> 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 =' 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. 

Then, when you click on the keymap var name from `C-u C-x =', 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.





  reply	other threads:[~2015-05-08 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 20:14 bug#20528: 25.0.50; `keymap' property to work for symbol-value, not just symbol-function Drew Adams
2015-05-08  6:38 ` Andreas Schwab
2015-05-08 15:25   ` Drew Adams [this message]
2015-05-08 15:33     ` Andreas Schwab
2015-05-08 17:51     ` Stefan Monnier
2021-09-04  7:22       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b90d00b-d8b9-463e-a6e1-e60f0f391a3e@default \
    --to=drew.adams@oracle.com \
    --cc=20528@debbugs.gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).