From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Gole Newsgroups: gmane.emacs.bugs Subject: bug#6622: [PATCH] 23.2; nxml-mode Indentation Behavior Date: Wed, 14 Jul 2010 11:51:56 +0800 Message-ID: References: <156989106.198531278985551802.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1279080027 23777 80.91.229.12 (14 Jul 2010 04:00:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Jul 2010 04:00:27 +0000 (UTC) To: 6622@debbugs.gnu.org, misty@redhat.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 14 06:00:24 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OYt8y-0004hL-D1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Jul 2010 06:00:24 +0200 Original-Received: from localhost ([127.0.0.1]:47835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYt8x-0007ix-8x for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Jul 2010 00:00:23 -0400 Original-Received: from [140.186.70.92] (port=43828 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYt8r-0007iU-My for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2010 00:00:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYt8q-0001eN-66 for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2010 00:00:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55324) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYt8q-0001eI-1q for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2010 00:00:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OYt0s-0005UH-76; Tue, 13 Jul 2010 23:52:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <156989106.198531278985551802.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> Resent-From: Geoff Gole Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jul 2010 03:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6622 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6622-submit@debbugs.gnu.org id=B6622.127907951221058 (code B ref 6622); Wed, 14 Jul 2010 03:52:02 +0000 Original-Received: (at 6622) by debbugs.gnu.org; 14 Jul 2010 03:51:52 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYt0i-0005TZ-8E for submit@debbugs.gnu.org; Tue, 13 Jul 2010 23:51:52 -0400 Original-Received: from mail-vw0-f44.google.com ([209.85.212.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYt0g-0005TB-L9 for 6622@debbugs.gnu.org; Tue, 13 Jul 2010 23:51:51 -0400 Original-Received: by vws14 with SMTP id 14so6275970vws.3 for <6622@debbugs.gnu.org>; Tue, 13 Jul 2010 20:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=e/bTIR9gI2Na/CIZKgMPNPIaZHOaunfCsITFEDCWpVk=; b=OI2Mc/AX/aL+h7HIYh+mv/z2asCLEC9A/3TJauPs1pdTkX1LxRIMQNsh8IK8BX5D38 viTY+CvbgsiJFHd9HMCZ+f68mPLQRg83yPpAAmwGhhDl+DJ54/W3rFHm1iFEcWRmwq7r 0aeYHA/dcq0Y0Jv+ZnY9PJ3Ba4A2DkGzk9Ol4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bI+8ntnNSwDUj81XfwHYdzQzuAxJJ+mOeb+4O6tEDiX5xRZf7fsE8ohwyKVJsAo48s Yh944SMQgmeiDAT99YaFUbkMBGKT9rfuDNKi4YgUPgpqft91hmPztoAmZXCdP96BLGM4 CdAtd+79x26WkRqSRovTCyei3LsqfXNBt7dqw= Original-Received: by 10.229.231.202 with SMTP id jr10mr9984361qcb.147.1279079516837; Tue, 13 Jul 2010 20:51:56 -0700 (PDT) Original-Received: by 10.229.48.194 with HTTP; Tue, 13 Jul 2010 20:51:56 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 13 Jul 2010 23:52:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38502 Archived-At: We discussed a workaround on #emacs already. But in case somebody else has this bug, this might help: (defadvice nxml-electric-slash (after indentation-bug-workaround activate) ;; fixme - workaround for indentation bug, remove once fixed (funcall indent-line-function)) And here's a patch: *** /usr/local/share/emacs/23.2/lisp/nxml/nxml-mode.el.gz --- /tmp/buffer-content-33187GX *************** on the line, reindent the line." *** 1212,1218 **** (eq (point) (1- slash-pos))))) (self-insert-command (prefix-numeric-value arg)) (unless arg ! (if nxml-slash-auto-complete-flag (if end-tag-p (condition-case err (let ((start-tag-end --- 1212,1218 ---- (eq (point) (1- slash-pos))))) (self-insert-command (prefix-numeric-value arg)) (unless arg ! (when nxml-slash-auto-complete-flag (if end-tag-p (condition-case err (let ((start-tag-end *************** on the line, reindent the line." *** 1232,1240 **** (nxml-scan-error nil)) (when (and (eq (nxml-token-before) (point)) (eq xmltok-type 'partial-empty-element)) ! (insert ">"))) (when (and end-tag-p at-indentation) ! (nxml-indent-line)))))) (defun nxml-balanced-close-start-tag-block () "Close the start-tag before point with `>' and insert a balancing end-tag. --- 1232,1240 ---- (nxml-scan-error nil)) (when (and (eq (nxml-token-before) (point)) (eq xmltok-type 'partial-empty-element)) ! (insert ">")))) (when (and end-tag-p at-indentation) ! (nxml-indent-line))))) (defun nxml-balanced-close-start-tag-block () "Close the start-tag before point with `>' and insert a balancing end-tag.