[Top][All Lists]

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

Replacing ocurrences of a string...

From: luca . spinacci
Subject: Replacing ocurrences of a string...
Date: Fri, 13 May 2005 15:15:14 +0200

I generate a C function template in a buffer running a command.
I would like to replace every occurence of the <name> string
on direct request.
Let's say:
M-x my-template-generator

generates in my - C - buffer
a template like

* <name>
void <name>()

} // <name>

I would like to be prompted for the function name to be replaced with.
Using (query-replace "<name>" "") in "my-template-generator" I have to
call SHIFT-e to be requested for "Edit replacement string: "  and
SHIFT-1 to replace every occurence of <name> with the new string "my-name".
Is there a smarter way (I'm sure there is) to be requested for the
string ("Edit replacement string: ") automatically as the template is
in the buffer without using SHIFT-e?
The function query-replace is not mandatory...

Thanks in advance,

reply via email to

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