Timeline for How to save a keyboard macro as a Lisp function?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 12, 2019 at 1:01 | comment | added | pyrocrasty |
Note that if you use the name-last-kbd-macro format (as mentioned by @phils above) you end up with a string, not a function. fset ting that to a symbol lets you execute the macro using M-x, but not call it from lisp (commandp -> t , functionp -> nil ). Strangely, even calling it via call-interactively doesn't work (although you can use execute-kbd-macro to run it).
|
|
Oct 9, 2014 at 6:06 | comment | added | phils |
Note also that Emacs can generate two different formats for keyboard macros. Which one you get when you insert-kbd-macro depends upon whether you named it using kmacro-name-last-macro (as in the above answer) or name-last-kbd-macro .
|
|
Sep 26, 2014 at 0:01 | vote | accept | Kaushal Modi | ||
Sep 24, 2014 at 15:31 | comment | added | Drew |
+1 for insert-kbd-macro . That is the answer to the question (and the rest of this answer provides additional help).
|
|
S Sep 24, 2014 at 13:03 | history | edited | Kaushal Modi | CC BY-SA 3.0 |
Use a simpler example
|
S Sep 24, 2014 at 13:03 | history | suggested | Amelio Vazquez-Reina | CC BY-SA 3.0 |
Fixing formatting on the last line
|
Sep 24, 2014 at 1:46 | review | Suggested edits | |||
S Sep 24, 2014 at 13:03 | |||||
S Sep 24, 2014 at 1:45 | history | suggested | Amelio Vazquez-Reina | CC BY-SA 3.0 |
Fixing code formatting 2
|
Sep 24, 2014 at 1:42 | review | Suggested edits | |||
S Sep 24, 2014 at 1:45 | |||||
Sep 24, 2014 at 0:45 | history | edited | Kaushal Modi | CC BY-SA 3.0 |
deleted 60 characters in body
|
Sep 23, 2014 at 23:00 | history | answered | Kaushal Modi | CC BY-SA 3.0 |