From: Pascal Bourguignon <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: call a macor
Date: Thu, 08 Feb 2007 22:36:01 +0100 [thread overview]
Message-ID: <87hctwxrge.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: m3sldg49tt.fsf@localhost.localdomain
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."
next prev parent reply other threads:[~2007-02-08 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-08 21:29 call a macor Gary Wessle
2007-02-08 21:36 ` Pascal Bourguignon [this message]
2007-02-08 23:28 ` Matthew Flaschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hctwxrge.fsf@thalassa.informatimago.com \
--to=pjb@informatimago.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.