all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Qs on key-description, substitute-command-keys
Date: Wed, 05 Oct 2005 10:23:43 -0600	[thread overview]
Message-ID: <di0umi$eao$1@sea.gmane.org> (raw)
In-Reply-To: <MEEKKIABFKKDFJMPIOEBCEPFCMAA.drew.adams@oracle.com>

Drew Adams wrote:
 > Why was the output from `key-description' and `substitute-command-keys'
 > changed to use angle brackets around simple key sequences like S-tab?

I would guess to make them consistent with kbd, insert-kdb-macro,
edit-kbd-macro, and view-lossage.

 > I have, for instance, a help string that looks like this when displayed:
 > (S-tab or TAB: list, C-h: help). I mean, that's what it looks like in 
Emacs
 > 20 - in Emacs 22, the first key sequence is shown as <S-tab>, while the
 > others remain simple, without angle brackets.

TAB (aka C-i) and C-h are ASCII characters and thus are categorized as
keyboard events.  <tab> is a function key, and <S-tab> is a modified
function key.

 > I'm sure there are good reasons why this was changed, but I'm curious 
why.
 >
 > Is there another standard function I can call, perhaps in combination 
with
 > `substitute-command-keys', to get the simpler representation, S-tab, from
 > the less readable <S-tab>? Or should I just roll my own?

The Keyboard Events node of the Emacs Lisp manual says "The 2**25 bit in
the character code indicates an ASCII control character typed with the
shift key held down."  So if you want a Shift-TAB, try (kbd "S-TAB"),
[(shift ?\t)], or [?\S-\C-i].

 > Also, is there a good way to control which of several key bindings for a
 > command is output by `substitute-command-keys'? The only way I've 
found is
 > to make sure that the one I want is the last of the key sequences for 
that
 > command defined in the map - and that's not always feasible. I found 
nothing
 > in the manual about which binding is displayed or how to control that.

-- 
Kevin Rodgers

  reply	other threads:[~2005-10-05 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 23:55 Qs on key-description, substitute-command-keys Drew Adams
2005-10-05 16:23 ` Kevin Rodgers [this message]
2005-10-05 16:39   ` Drew Adams
2005-10-14 22:53 ` Drew Adams
2005-10-15 11:27   ` Juri Linkov
2005-10-15 14:25     ` Drew Adams
2005-10-16 14:40     ` Richard M. Stallman
2005-10-15 11:54   ` Stefan Monnier
2005-10-15 14:35     ` Drew Adams
2005-10-16 13:07       ` Stefan Monnier
2005-10-16 14:40       ` Richard M. Stallman
2005-10-15 18:00     ` John S. Yates, Jr.
2005-10-16 13:12       ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to='di0umi$eao$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.