[comp.emacs] Keyboard macros to elisp

inc@tc.fluke.COM (Gary Benson) (02/24/89)

" while going through the directory of available elisp, I noticed that
" apparently someone in the UK did write some "generate" code a little
" over a year ago.  The description says that it is a macro-to-elisp
 
" So, has anyone used this?  Can you give us any idea of how well it
" works?  Thanks much.
 
" Dave

"       tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu


Yes, I have used something like what you describe, but it converts keyboard
input to elisp, that is, it doesn't convert an already existing keyboard
macro.

Here's how it works (in our incantation at least, which is emacs-264 with
overlaying profiles):

1. In any buffer, type M-x, then at the colon, type:

    gen-on

2. Emacs responds:

    function name:

3. Give it a name (so emacs can create the defun line.

4. Now, just input your keystrokes. When you're done, type M-x gen-off.
   Eamcs displays a buffer called "generate" which you can then edit into
   something worthwhile.

The elisp that gen-on generates is just a "skeleton", and there are a lot of
blanks to fill in, but this is good start for a way to save frequently-done
macros. After editing, you can store it as a normal file in your
macrolibrary or make it part of your .profile.

All the best to you. I hope someone can get some use of this; I enjoy
reading this newsgroup and have gotten many good ideas here, and lots of
help in figuring things out.