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

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

Re: call a macor


From: Pascal Bourguignon
Subject: Re: call a macor
Date: Thu, 08 Feb 2007 22:36:01 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Gary Wessle <phddas@yahoo.com> writes:
> some times ago, I defined some macros in my .emacs, now that I forgot
> how to call them, say a name of a macro is "str" how do I call it?

Macros are called like functions. If it's named str then: (str args...)

Macros are also defined with defmacro, and if you don't remember how
they're called, that probably means that you don't know what you're
speaking about.  So I assume you didn't write a macro, but a function
or a command.

A function is defined with defun.
A command is defined with defun and begins with (interactive ...)

If you have defined a command named str, then you can invoke it 
with M-x str RET

If you have defined a function named str, then you can call it either
with:  M-: (str args...) RET
or writting the expression (str args...) in a buffer, and typing C-x C-e


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Debugging?  Klingons do not debug! Our software does not coddle the
weak."


reply via email to

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