[Top][All Lists]

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

Re: Fwd: Requesting review for change to lisp/textmodes/sgml-mode.el

From: Stefan Monnier
Subject: Re: Fwd: Requesting review for change to lisp/textmodes/sgml-mode.el
Date: Mon, 09 Mar 2015 21:32:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> Another way to look at it is that the attribute name is indented
>> 2 spaces with respect to the element name, so things are working
>> as designed.

That's indeed the way I look at it.

> That makes sense, but it seems inconsistent with the behavior of other
> major modes in similar contexts. For example, Lisp indentation is
> relative to the enclosing delimiter rather than the operator name.

It's a philosophical question.  I tend to look at XML's <...> as
a parenthesis-like thingy that encloses a sub-language.

> Another option would be to adopt nxml's solution and add a new variable
> for the attribute indentation relative to the tag delimiter, which has
> the additional advantage of allowing attribute and element indentation
> to be customized independently. It could default to `(1+
> sgml-basic-offset)' to avoid changing the existing behavior.

Yes, that's the main issue: the two are distinct cases that should
have separate indentation rules.
I think we all violently agree on this.


reply via email to

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