[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Behavior of `this-command-keys'
From: |
Jay Belanger |
Subject: |
Re: Behavior of `this-command-keys' |
Date: |
Tue, 12 Sep 2006 11:40:27 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Richard Stallman <address@hidden> 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