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

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

Re: How to tame compiler?


From: Stefan Monnier
Subject: Re: How to tame compiler?
Date: Sat, 01 May 2021 09:38:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>   I have to understand it in this example:
>   
>   The HTML template is following and it is string:
>
>   <html>
>     <head>
>       <title>⟦ xml-escape title ⟧</title>
>     </head>
>     <body>
>       <p>Today is one US dollar this many euros: ⟦ usd-eur 1 ⟧</p>
>     </body>
>   </html>

I think the way I'd attack this is similar to what was suggested
recently.  I think I'd introduce a macro (call it `xml-template`) which
you'd use maybe as follows:

    (xml-template
     (html
      (head (title ,title))
      (body (p "Today is one US dollar this many euros: " ,@(usd-eur 1)))))

where `,` is used to insert a random chunk of plain text,
whereas `,@` is used to insert a chunk of XML.


        Stefan




reply via email to

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