[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making callable function of a macro
From: |
harven |
Subject: |
Re: Making callable function of a macro |
Date: |
Thu, 25 Sep 2008 11:24:44 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) |
Decebal <CLDWesterhof@gmail.com> writes:
> Now other people like the functionality that I made. ;-}
> But they do not use Emacs. So I would like to change the macro to a
> function. In this way the script that is used to generate the input
> files, could call Emacs and process them directly. Is this possible?
> If so: how would I do this?
> I have worked with Emacs, but not really with the Lisp capabilities.
> More as an editor.
You better give a name to your macro : C-x C-k n MY-MACRO
then go to your init file and type : M-x insert-kbd-macro RET MY-MACRO RET
This will put under your cursor the definition of a command that
executes the macro. This command can be called interactively the usual
way (M-x MY-MACRO) or put in your script.
I must say that it is not clear what your macro does. I would guess
that you want to keep the text between the two starting = signs and
add a header. But that's not what happens when I run your macro.
Instead it strips everything before the second = sign and add the
header. Also I think the ! insertion is meant to do the replacement
until end of file, but here again that's not what I obtain when I run
the macro.
Re: Making callable function of a macro, Joost Kremers, 2008/09/25
Re: Making callable function of a macro,
harven <=
Re: Making callable function of a macro, Decebal, 2008/09/30