[EMAIL PROTECTED] (Kim F. Storm) writes: > David Kastrup <[EMAIL PROTECTED]> writes: > >> [EMAIL PROTECTED] (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 _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel