----- Original Message ----- 
From: "Mark Mynsted" <[email protected]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 9:12 AM
Subject: Toggle comments in jde-gen.el


> OK.  I attempted to get some code working this week-end to toggle
> comments for the auto-generated code, and failed.  The problem I am
> having is that the "(s clause)" code keeps getting run as lisp code
> rather than as part of the tempo template.
> 
> Does anybody have any idea how to get this to work?  The following is
> a example.
> 
> I set up a boolean variable called jde-gen-comments as follows:
> 
> (defcustom jde-gen-comments t
>   "*If no-nil, use comments, else do not use comments.
> with comments:
> 
>       try 
>       {
> 
> 
>       } catch (Exception e) 
>       {
> 
>       } // end of try-catch
> 
> witout comments:
> 
>       try 
>       {
> 
> 
>       } catch (Exception e) 
>       {
> 
>       }
> 
> Setting this variable to t, uses comments in skeletons and templates."
>   :group 'jde-gen
>   :type 'boolean)
> 
> 
> Here is an example of what I am attempting to do and how it does not
> work.  The error is "Symbol's function definition is void: s".  I
> assume this is because the code is in a (l expression) block, and so
> the (s clause) is being evaluated.  I have tried everything I can
> think of, even putting the (s clause) in a variable then appending it
> if applicable...  If I do that, then the the literal text (s clause)
> is written in the comment rather then the value stored by tempo in
> clause.  I would really like to figure this out.  Altering the
> templates via customize is far too time consuming.  I would rather
> alter the jde-gen.el once, that keep altering via customize...
> 
> (defcustom jde-gen-cflow-if
>   '(
>     "(if (jde-parse-comment-or-quoted-p)"
>     "'(l \"if\")"
>     "'(l '> \"if (\" (p \"if-clause: \" clause) \") \""
>     "(if jde-gen-k&r "
>     "()"
>     "'>'n)"
>     "\"{\"'>'n'>'r'n"
>     "\"}\""
>     "(if jde-gen-comments "
>     "(concat \" // end of if (\" (s clause) \")\")"

Does

 "(list \" // end of if (\" '(s clause) \")\")"

work?

- Paul






Reply via email to