[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bugs with indentation in html mode
From: |
Angela Bellavance |
Subject: |
Possible bugs with indentation in html mode |
Date: |
Fri, 16 Feb 2007 17:31:18 -0600 |
User-agent: |
Thunderbird 1.5.0.9 (Windows/20061207) |
Hello,
I'm editing HTML code using emacs and I'm noticing
some strange behavior with the indentation.
I can hit TAB on elements like "<table>" and "<tr>"
and "<td>", and emacs will happily indent each by
two spaces relative to the container tag, ending the
additional space when it finds the corresponding
closing tag. However, it does not handle single tags
well (e.g. "<br>", "<meta...>", etc.). Emacs adds
the two-space indentation following one of these
single tags and will not decrement the indentation
unless a closing tag is found for some surrounding
set of tags.
Is there any chance of fixing this behavior?
I had one other question as well. Is there any way
to make the indentation behavior follow the
"relative to previous line" rule? Personally, I
don't always want the addition of two spaces of
indentation added every time I open a tag set. For
example, I would prefer something like this:
<html>
<head>
<title>
<font color="black">This is my title</font>
</title>
</head>
<body>
<h1>This is my title</h1>
<br>
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>
</body>
</html>
But if I TAB-indent the above HTML using Emacs, I
get this:
<html>
<head>
<title>
<font color="black">This is my title</font>
</title>
</head>
<body>
<h1>This is my title</h1>
<br>
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>
</body>
</html>
When I've got nested tables with large cell
contents, having every line indented those extra
several spaces can really be a pain....
Thanks for any help or suggestions!
- Angela
--
Dr. Angela Bellavance
Fermilab Computing Division
Running Experiments Operations
630-840-2284
bellavan@fnal.gov
- Possible bugs with indentation in html mode,
Angela Bellavance <=