help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Recording a macro that preserves timing


From: Stefan Monnier
Subject: Re: Recording a macro that preserves timing
Date: Thu, 04 Oct 2012 09:33:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

> How difficult would such elisp code be to make?

Not sure.  I'd recommend you look at kmacro.el.
I'd suggest you change kmacro-start-macro to add a pre-command-hook that
records the time of every command, and then in kmacro-end-macro record
those timings alongside the actual macro.

Maybe you could combine the two into a normal macro, but this requires
some trick because macros contain sequences of *events* (like
key-presses) rather than commands, so you can't directly add code
into them.
But you could use a special `macro-wait' event, and add a binding for it
in the global-map.

Otherwise, you'll need to write a new function to run your macros.


        Stefan


reply via email to

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