Questions tagged [event-sequence]
4 questions
4
votes
1 answer
Process unread-command-events and redisplay
(defun pretend (keys)
(dolist (e (reverse (listify-key-sequence (kbd keys))))
(push e unread-command-events)
;; (mystery-function)
(redisplay t)
(sleep-for 0.1)))
(pretend "M-x my-function-")
This function is intended to take key…

Sean Allred
- 6,861
- 16
- 85
4
votes
2 answers
Can a command determine the event sequence that invoked it?
I have a command that I would like to bind to multiple key sequences differing only in the final decimal digit (e.g. C-. 0, C-. 1, ..., C-. 9). The command needs to determine that final digit.
I would prefer not to have 10 distinct bindings, each…

John Yates
- 201
- 1
- 5
3
votes
0 answers
Avoiding screen flickering when one theme is disabled and another enabled (inhibit redraw???)
Is it possible to temporarily disable buffer (and frame) redraws? I particuarly mean situation, when I disable some theme and enable another one, and would like to avoid a moment when emacs flashes with white background.
Illustration
To prepare,…

Mekk
- 1,017
- 7
- 14
2
votes
1 answer
How to use unread-command-events variable?
I want to generate some input from my command programmatically. I have tried using unread-command-events variable for that, see:
(defun unread_test ()
"Repeat input after toggling input method"
(interactive)
(let ((kseq (listify-key-sequence…

Srv19
- 479
- 3
- 15