Subject: bug#20528: 25.0.50; `keymap' property to work for symbol-value, not just symbol-function

From: Drew Adams <[email-masked]>
Date: Fri, 8 May 2015 08:25:58 -0700 (PDT)

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