From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Per Starbäck" <per@starback.se>
Cc: emacs-devel@gnu.org
Subject: Re: where-is only mentions first key in interval
Date: Mon, 13 Feb 2012 11:00:45 -0500 [thread overview]
Message-ID: <jwvfweesp59.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADkQgvtHDwCX2Dm=WY1eqFU+-ZT2EiLJma2VXGYTOu2eK=dbsg@mail.gmail.com> ("Per Starbäck"'s message of "Mon, 13 Feb 2012 16:19:24 +0100")
> (key-description [(101 . 102)]) returns just "e".
I've installed the patch below, so it will display as
"dired-find-file is on RET, e..f, <menu-bar>"
It would be better to handle such "trivial" intervals as separate keys,
but that's a larger change (because "C-x e..f" needs to be turned into
"C-x e, C-x f").
Stefan
=== modified file 'src/keymap.c'
--- src/keymap.c 2012-01-19 07:21:25 +0000
+++ src/keymap.c 2012-02-13 15:52:25 +0000
@@ -2270,9 +2270,15 @@
if (CONSP (key) && lucid_event_type_list_p (key))
key = Fevent_convert_list (key);
+ if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key)))
+ /* An interval from a map-char-table. */
+ return concat3 (Fsingle_key_description (XCAR (key), no_angles),
+ build_string (".."),
+ Fsingle_key_description (XCDR (key), no_angles));
+
key = EVENT_HEAD (key);
- if (INTEGERP (key)) /* Normal character */
+ if (INTEGERP (key)) /* Normal character. */
{
char tem[KEY_DESCRIPTION_SIZE], *p;
@@ -2280,7 +2286,7 @@
*p = 0;
return make_specified_string (tem, -1, p - tem, 1);
}
- else if (SYMBOLP (key)) /* Function key or event-symbol */
+ else if (SYMBOLP (key)) /* Function key or event-symbol. */
{
if (NILP (no_angles))
{
next prev parent reply other threads:[~2012-02-13 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 15:19 where-is only mentions first key in interval Per Starbäck
2012-02-13 16:00 ` Stefan Monnier [this message]
2012-02-13 16:15 ` Drew Adams
2012-02-13 16:28 ` Per Starbäck
2012-02-13 17:06 ` Drew Adams
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=jwvfweesp59.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=per@starback.se \
/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.