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

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

Re: macro with argument


From: Joakim Hove
Subject: Re: macro with argument
Date: Mon, 20 Oct 2003 15:20:52 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux)

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

> David Kastrup <dak@gnu.org> writes:
>
>> (defun my_macro (string) (interactive "syour argument: ") (message
>> "bla %s blo" string))
>
> This prints "bla [argument] blo" in the mini buffer. I wanted Emacs to
> print it in the active (?) buffer, i.e. in the buffer from which I
> call the function. 

Replace the (message ) function with (insert ):

  (insert (format "bla %s blo" string))

HTH - Joakim



-- 
  /--------------------------------------------------------------------\
 / Joakim Hove  / hove@bccs.no  /  (55 5) 84076       |                 \
 | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
 | CMU                                                | 5231 Paradis    |
 \ Thormøhlensgt.55, 5020 Bergen.                     | 55 91 28 18     /
  \--------------------------------------------------------------------/


reply via email to

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