emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading key sequences followed by read-event.


From: Jay Belanger
Subject: Reading key sequences followed by read-event.
Date: Mon, 09 May 2005 11:12:01 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I would expect the following function to prompt for a key sequence, 
read it, then display a message "You just pressed ..." while waiting 
for another event.  
That's what it does if the key sequence is one character, but if it is
more than one character, then after the key sequence (say "ab") is read, 
the minibuffer appears again with the "Key sequence: a b-" prompt while 
waiting for another event.  
Is this expected behavior, and if so, how can I keep the echo area displayed?

(defun hmm (key)
  (interactive "kKey sequence: ")
  (message "You just pressed the key sequence %s" (key-description key))
  (read-event))

Thanks,
Jay




reply via email to

[Prev in Thread] Current Thread [Next in Thread]