|
From: | Kevin Rodgers |
Subject: | Re: Emacs attach an action to any key pressed |
Date: | Wed, 05 Jun 2013 07:24:29 -0600 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 |
On 6/5/13 1:56 AM, Ivanov Dmitry wrote:
I tried this: (defun dummy () (interactive) (message "aaa") (remove-hook 'post-command-hook 'dummy)) (add-hook 'post-command-hook 'dummy) It prints "aaa" exactly after I press C-x e on add-hook command. But I want it to print only when I press any key afterwards. What should I do?
(when (read-event "Press any key to continue: ") (message "aaa")) -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |