[Top][All Lists]

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

Re: Indentation bug in html-mode

From: Stefan Monnier
Subject: Re: Indentation bug in html-mode
Date: Wed, 25 Apr 2007 15:35:32 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

>>>>> The attached file is valid XHTML 1.1 but indents badly because of the < 
>>>>> inte
>>>>> <?php ... ?> part. I paste it here for simplicity too:
>>>> Hmm... does the patch below fix it for you?
>>>> If you put a "<?" inside your PHP code, it seems it would still be valid
>>>> XML, but indentation will probably get confused.
>>> It fixes the last two lines (</body> and </html>), but not the </div> line.
>> The additional patch below should fix that, provided Emacs is in XHTML mode
>> (rather than HTML mode).  If I understand the HTML docs properly your
>> example code is not valid in HTML because the < is not allowed inside
>> <?php ...>.

> Thanks, indeed that did the trick.

> I guess you with XHTML mode mean html-mode + XHTML DTD? How do I get
> html-mode to follow the XHTML DTD? In the circumstances I am going to use it
> sometimes there are no proper header part with DTD spec.

No, I mean that Emacs is using html-mode with sgml-xml-mode set to t (this
is normally reflected in the mode-line as "XHTML").


reply via email to

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