From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robin Templeton Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Requesting review for change to lisp/textmodes/sgml-mode.el Date: Mon, 09 Mar 2015 20:07:29 -0400 Message-ID: <87h9ttbtq6.fsf@panthera.terpri.org> References: <87a8zn7vum.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1425946087 4569 80.91.229.3 (10 Mar 2015 00:08:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Mar 2015 00:08:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 10 01:08:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YV7iI-0002Uf-VJ for ged-emacs-devel@m.gmane.org; Tue, 10 Mar 2015 01:07:59 +0100 Original-Received: from localhost ([::1]:45833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV7iI-0005FV-8Z for ged-emacs-devel@m.gmane.org; Mon, 09 Mar 2015 20:07:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV7i5-0005FF-GB for emacs-devel@gnu.org; Mon, 09 Mar 2015 20:07:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YV7i1-0000Vk-F9 for emacs-devel@gnu.org; Mon, 09 Mar 2015 20:07:45 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:56988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV7i1-0000VS-8C for emacs-devel@gnu.org; Mon, 09 Mar 2015 20:07:41 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YV7hx-00026o-6H for emacs-devel@gnu.org; Tue, 10 Mar 2015 01:07:37 +0100 Original-Received: from cpe-174-097-170-150.nc.res.rr.com ([174.97.170.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Mar 2015 01:07:37 +0100 Original-Received: from robin by cpe-174-097-170-150.nc.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Mar 2015 01:07:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cpe-174-097-170-150.nc.res.rr.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:AQcAqBnIElpVkHw2N9m44LW/Poo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183749 Archived-At: Thien-Thi Nguyen writes: > () Jackson Hamilton > () 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!