unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: Chong Yidong <cyd@stupidchicken.com>, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Tweak to key-description for menu bindings
Date: Mon, 28 Feb 2005 13:55:30 +0100	[thread overview]
Message-ID: <x5y8d8j131.fsf@lola.goethe.zz> (raw)
In-Reply-To: <m3r7j098zq.fsf_-_@kfs-l.imdomain.dk> (Kim F. Storm's message of "Mon, 28 Feb 2005 13:14:49 +0100")

storm@cua.dk (Kim F. Storm) writes:

> David Kastrup <dak@gnu.org> writes:
>
>> storm@cua.dk (Kim F. Storm) writes:
>>
>>> It also improves handling of menu bar entries in two ways:
>>>
>>> 1) If menu-bar-mode is disabled, it doesn't mention menu bar bindings.
>>>
>>> 2) It pretty prints menu bar entries like this:
>>>     e.g. "File Menu" rather than "<menu-bar> <file> <new-file>"
>>
>> Uh, how is it an improvement to leave off the "New file" information
>> from the menu?
>
> I have been looking further into "menu binding pretty-printing",
> and I agree that my previous approach was too narrow-minded.
>
> I now have a solution where key-description produces a real human
> readable text for menu bindings.
>
> For example,
>
> (key-description [menu-bar file new-file])
>
> now prints
>
>  <menu-bar> <file> <new-file>
>
> whereas with my patch to key-description, it will print
>
>  File=>New File...
>
> New:
> Options=>Mule (Multilingual Environment)=>Set Coding Systems=>For Next Command
>
>
> Shall I install this?

My vote is "yes".  However, I would also want to suggest that such
pretty-printed key sequences can, as some sort of a general principle,
be passed to the kbd macro to make a target for define-key, so that
the developer can be spared having to switch on his brain as often as
possible.  I don't know how feasible this is as kbd is a macro, and
the lookup could depend on the keymaps currently active or something.

But since kbd is a macro, it could also return a substitution that
will do the lookup at runtime depending on the maps then current.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-02-28 12:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 14:35 tweak to apropos-command display Chong Yidong
2005-02-21 15:04 ` Kim F. Storm
2005-02-21 16:26   ` Chong Yidong
2005-02-21 15:14 ` Stefan
2005-02-21 16:36   ` Chong Yidong
2005-02-22 18:11 ` Richard Stallman
2005-02-22 20:36   ` Kevin Rodgers
2005-02-22 21:46   ` Kim F. Storm
2005-02-22 22:01     ` David Kastrup
2005-02-22 22:28       ` Kim F. Storm
2005-02-28 12:14       ` Tweak to key-description for menu bindings (was Re: tweak to apropos-command display) Kim F. Storm
2005-02-28 12:55         ` David Kastrup [this message]
2005-03-01 23:36           ` Tweak to key-description for menu bindings Kim F. Storm
2005-02-28 21:53         ` Tweak to key-description for menu bindings (was Re: tweak to apropos-command display) Richard Stallman
2005-02-28 22:47           ` Tweak to key-description for menu bindings Kim F. Storm
2005-02-22 22:13     ` tweak to apropos-command display Stefan Monnier
2005-02-22 22:31       ` Kim F. Storm

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=x5y8d8j131.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.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).