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

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

[h-e-w] Template creation


From: Rajesh J Advani
Subject: [h-e-w] Template creation
Date: Fri, 15 Feb 2002 17:54:16 +0530

Hi,

I'm using Emacs 21.1 (precompiled version), on Win2k, and I know no
Lisp/Elisp.

I regularly have this need to insert certain code (say comments)
following a given template, repeatedly in to my sourcecode, where only a
couple of words in  that template change.

eg - 

Template - 

-----------------------------------------------------------------
<SETVALUE BEAN="B2RResourceLoader.Property" VALUE="<The variable text
goes here>">
<VALUEOF BEAN="B2RResourceLoader.PropertyValue"/>
-----------------------------------------------------------------

So this would be repeated as

<SETVALUE BEAN="B2RResourceLoader.Property" VALUE="Value1">
<VALUEOF BEAN="B2RResourceLoader.PropertyValue"/>

<SETVALUE BEAN="B2RResourceLoader.Property" VALUE="Value2">
<VALUEOF BEAN="B2RResourceLoader.PropertyValue"/>

<SETVALUE BEAN="B2RResourceLoader.Property" VALUE="Value3">
<VALUEOF BEAN="B2RResourceLoader.PropertyValue"/>

etc, in my code.

Is there some lisp available to automate this? I want it so that all I
need is a key-stroke or two to insert the template into my buffer, and
then it prompts me for the text for the different variable fields.
I've seen functionality like this in JDE, and XAE modes.

I'm not averse to writing a bit of lisp if required. But I'd prefer
simple code reuse ;)

-- 
Rajesh J Advani
-----------------------------------
The fact that no one understands 
you doesn't mean you're an artist.

Attachment: Wipro_Disclaimer.txt
Description: Text document


reply via email to

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