emacs-devel
[Top][All Lists]
Advanced

[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: Robin Templeton
Subject: Re: Fwd: Requesting review for change to lisp/textmodes/sgml-mode.el
Date: Mon, 09 Mar 2015 20:07:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Thien-Thi Nguyen <address@hidden> writes:

> () Jackson Hamilton <address@hidden>
> () Sat, 7 Mar 2015 16:49:59 -0800
>
>    But sgml-basic-offset defaults to 2, not 3, so it doesn't
>    make much sense that the attribute is indented by 3 spaces.
>
> 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 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.

> Maybe a better approach would be to introduce a variable that
> controls the ‘1+’ such that indentation-wrt-element-name (status
> quo) remains as is doesn't ruffle the feathers of long-time
> users, yet indentation-wrt-element-angle-brace is available for
> those (including yourself) who prefer it.

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.

-- 
Inteligenta persono lernas la lingvon Esperanton rapide kaj facile.
Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla,
belsona, Esperanto estas la praktika solvo de la problemo de universala
interkompreno. Lernu la interlingvon Esperanton!




reply via email to

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