unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: macro with argument
Date: 20 Oct 2003 13:57:29 +0200	[thread overview]
Message-ID: <x5ekx82kba.fsf@lola.goethe.zz> (raw)
In-Reply-To: crtad7wrwfh.fsf@pinatubo.cis.uni-muenchen.de

Joerg Schuster <js@cis.uni-muenchen.de> writes:

> Hello,
> 
> how can I write "macros with arguments"?
> 
> Example: 
> 
> [Me:]    M-x my_macro
> [Emacs:] your argument:
> [Me:]    foo
> 
> Then emacs should print e.g.
> 
> bla foo blo

(defun my_macro (string) (interactive "syour argument: ") (message
"bla %s blo" string))

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2003-10-20 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-20 11:16 macro with argument Joerg Schuster
2003-10-20 11:57 ` David Kastrup [this message]
2003-10-20 12:33   ` Joakim Hove
2003-10-20 13:16   ` Joerg Schuster
2003-10-20 13:20     ` Joakim Hove
2003-10-20 13:48       ` Joerg Schuster

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5ekx82kba.fsf@lola.goethe.zz \
    --to=dak@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.
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).