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

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

Re: Indentation for html-mode


From: Lennart Borgman (gmail)
Subject: Re: Indentation for html-mode
Date: Sun, 13 Apr 2008 14:38:01 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Jens Teich wrote:
Example from Edi Weitz' Lisp package HTML-Template
(http://weitz.de/html-template/):

<table border=1>
  <!-- TMPL_LOOP rows -->
    <tr>
      <!-- TMPL_LOOP cols -->
        <!-- TMPL_IF colorful-style -->
          <td align="right" bgcolor="pink"><!-- TMPL_VAR content --></td>
        <!-- TMPL_ELSE -->
          <td align="right" ><!-- TMPL_VAR content --></td>
        <!-- /TMPL_IF -->
      <!-- /TMPL_LOOP -->
    </tr>
  <!-- /TMPL_LOOP -->
</table>

is indented in html-mode

<html>
  <table border=1>
    <!-- TMPL_LOOP rows -->
    <tr>
      <!-- TMPL_LOOP cols -->
      <!-- TMPL_IF colorful-style -->
      <td align="right" bgcolor="lime"><!-- TMPL_VAR content --></td>
      <!-- TMPL_ELSE -->
      <td align="right" ><!-- TMPL_VAR content --></td>
      <!-- /TMPL_IF -->
      <!-- /TMPL_LOOP -->
    </tr>
    <!-- /TMPL_LOOP -->
  </table>
</html>

because the comment-like tags "<!-- TMPL ..." are unknown. How do I
teach html-mode to recognize their special meaning?

It looks like a job for the template library. Doesn't it provide indenting?




reply via email to

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