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

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

Re: [h-e-w] Template creation


From: Rajesh J Advani
Subject: Re: [h-e-w] Template creation
Date: Sat, 16 Feb 2002 14:41:51 +0530

Hey, thanks for the code. It works pretty neatly if I remove the
"'c-tempo-tags" line. I don't seem to have that command on my machine.

Now what I'd love is a piece of code to convert the template text with
some placeholder symbols (maybe like "$placeholder") into the
corresponding lisp, and eval it. (Not too much to ask is it?). Sadly my
lisp coding capabilities are more or less zilch, so I don't know how to
do any string parsing, loading into memory, and eval'ing from memory.

If I had this, my life would be much easier. My templates are not very
long-lived, so writing all that code would seem like overkill.

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

Wojciech Komornicki wrote:
> 
> Take a look at the tempo package.  It allows you to create templates
> with prompts for variable inputs.  As an example, load tempo.elc and
> then evaluate the code
> 
>              (tempo-define-template "cif"
>                        '(> "if (" (P "if-clause: " clause) ") {"  n>
>                           > r n
>                          "}" > n>
>                          )
>                        "if"
>                        "Insert a C if statement"
>                        'c-tempo-tags)
> 
> Finally run the function
>          tempo-template-cif
> 
> I use templates like this bound to various keys to insert code template,
> especially in teaching beginning level programming classes.

Attachment: Wipro_Disclaimer.txt
Description: Text document


reply via email to

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