unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* call a macor
@ 2007-02-08 21:29 Gary Wessle
  2007-02-08 21:36 ` Pascal Bourguignon
  2007-02-08 23:28 ` Matthew Flaschen
  0 siblings, 2 replies; 3+ messages in thread
From: Gary Wessle @ 2007-02-08 21:29 UTC (permalink / raw)
  To: help-gnu-emacs

Hi

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?

thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: call a macor
  2007-02-08 21:29 call a macor Gary Wessle
@ 2007-02-08 21:36 ` Pascal Bourguignon
  2007-02-08 23:28 ` Matthew Flaschen
  1 sibling, 0 replies; 3+ messages in thread
From: Pascal Bourguignon @ 2007-02-08 21:36 UTC (permalink / raw)
  To: help-gnu-emacs

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."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: call a macor
  2007-02-08 21:29 call a macor Gary Wessle
  2007-02-08 21:36 ` Pascal Bourguignon
@ 2007-02-08 23:28 ` Matthew Flaschen
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Flaschen @ 2007-02-08 23:28 UTC (permalink / raw)
  To: emacs


[-- Attachment #1.1: Type: text/plain, Size: 237 bytes --]

Gary Wessle wrote:
> Hi
> 
> 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?

To call it interactively:

Alt-x str

Matthew Flaschen


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-08 23:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-08 21:29 call a macor Gary Wessle
2007-02-08 21:36 ` Pascal Bourguignon
2007-02-08 23:28 ` Matthew Flaschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).