all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jay Belanger <belanger@truman.edu>
Cc: belanger@truman.edu
Subject: Re: Behavior of `this-command-keys'
Date: Tue, 12 Sep 2006 11:40:27 -0500	[thread overview]
Message-ID: <87hczdyr5w.fsf@vh213602.truman.edu> (raw)
In-Reply-To: <E1GMxaC-0002QV-4U@fencepost.gnu.org> (Richard Stallman's message of "Mon\, 11 Sep 2006 22\:01\:04 -0400")


Richard Stallman <rms@gnu.org> writes:

>     Consider something like:
>       (defun test ()
> 	(interactive)
> 	(sit-for 1)
> 	(setq result (this-command-keys)))
>       (global-set-key "a" 'test)
>     To me, it sounds like as if `result' should equal "a" (the key which
>     calls the function) if "ab" were pressed, whether or not the `sit-for'
>     had run its course.
>
> It seems that the documentation of this-command-keys is wrong.  Its
> value seems to include any keys that were read by read-event.

I take it that's the desired value, then.

> Given this fact, it is clear why sit-for now has the result it does:
> it reads that event using read-event.
>
> Does this fix it?

In the above test, the result is always "a"; so I guess the patch
fixes it.

Jay

  reply	other threads:[~2006-09-12 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11 17:54 Behavior of `this-command-keys' Jay Belanger
2006-09-11 22:13 ` Kim F. Storm
2006-09-12 16:42   ` Jay Belanger
2006-09-12  2:01 ` Richard Stallman
2006-09-12 16:40   ` Jay Belanger [this message]
2006-09-13 15:10     ` Richard Stallman

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=87hczdyr5w.fsf@vh213602.truman.edu \
    --to=belanger@truman.edu \
    /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.