unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Replacing ocurrences of a string...
@ 2005-05-13 13:15 luca.spinacci
  0 siblings, 0 replies; 3+ messages in thread
From: luca.spinacci @ 2005-05-13 13:15 UTC (permalink / raw)



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
replacement
string ("Edit replacement string: ") automatically as the template is
inserted
in the buffer without using SHIFT-e?
The function query-replace is not mandatory...

Thanks in advance,
Luca.

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

end of thread, other threads:[~2005-05-13 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.5053.1115990680.2819.help-gnu-emacs@gnu.org>
2005-05-13 14:35 ` Replacing ocurrences of a string Pascal Bourguignon
2005-05-13 15:04 ` Greg Rowe
2005-05-13 13:15 luca.spinacci

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