bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8951: 24.0.50; [PATCH] enhancement request: buttonize key names


From: Stefan Monnier
Subject: bug#8951: 24.0.50; [PATCH] enhancement request: buttonize key names
Date: Wed, 06 Jul 2011 14:49:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> Basically, the thing I don't like about your patch is the resulting
>> redundancy between help-substitute-command-keys and
>> substitute-command-keys, which could be removed by getting rid of the
>> C version and only using the new Elisp version.

> See the emacs-devel thread, where I addressed both of these things.
> http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg01081.html

I don't think that quite addresses it.  But, I guess it does indirectly:
you apparently haven't found problematic cases that require
distinguishing help-substitute-command-keys from
substitute-command-keys.  Instead you just personally prefer to keep the
option whether to buttonize or not.

> I wrote Lisp, but if someone wants to instead patch the C code for
> `substitute-command-keys' then go for it.

No, I'm not interested in making this C code more complicated.  I want
to go the other way around.

> The Lisp version I wrote still invokes the original C code for the
> \\{...} case.  I did not try to rewrite that in Lisp.

I see.  It should be pretty easy to do, easy exporting the needed
underlying C function to Elisp, or rewriting it in Elisp (there's no
good reason to have describe-buffer-bindings written in C, really).

> 1. Keep the Lisp code I wrote (or similar), renaming it to
> `substitute-command-keys'.

Sounds good.

> 2. Simplify the original C code to handle just the \\{...} case,
> rename that function, and use it in #1 to handle the \\{...} parts
> (just as now, but under its new, {}-specific name).

Sounds good.

> Alternatively, you can write #2 in Lisp, if you like.

Sounds good as well.

> Wrt your question of whether "there are places where such buttons
> become annoying": I would say that it does not matter whether there
> are currently any such places.  There is no reason not to treat the
> buttonizing as optional.

Of course there's the reason that providing a choice is never free, so
we should only provide the choice if there's a good reason for it.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]