all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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
[parent not found: <mailman.5053.1115990680.2819.help-gnu-emacs@gnu.org>]

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 --
2005-05-13 13:15 Replacing ocurrences of a string luca.spinacci
     [not found] <mailman.5053.1115990680.2819.help-gnu-emacs@gnu.org>
2005-05-13 14:35 ` Pascal Bourguignon
2005-05-13 15:04 ` Greg Rowe

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.