From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Gole Newsgroups: gmane.emacs.devel Subject: [PATCH] Fix for bug 6622, nxml-mode Indentation Behavior Date: Tue, 13 Jul 2010 10:09:36 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1278986991 22831 80.91.229.12 (13 Jul 2010 02:09:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Jul 2010 02:09:51 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 13 04:09:50 2010 Return-path: Envelope-to: ged-emacs-devel@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 1OYUwL-0000gS-8k for ged-emacs-devel@m.gmane.org; Tue, 13 Jul 2010 04:09:45 +0200 Original-Received: from localhost ([127.0.0.1]:55042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYUwK-0003oq-OS for ged-emacs-devel@m.gmane.org; Mon, 12 Jul 2010 22:09:44 -0400 Original-Received: from [140.186.70.92] (port=35715 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYUwE-0003oc-Na for emacs-devel@gnu.org; Mon, 12 Jul 2010 22:09:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYUwD-0003pW-Dj for emacs-devel@gnu.org; Mon, 12 Jul 2010 22:09:38 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:34533) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYUwD-0003pI-AV for emacs-devel@gnu.org; Mon, 12 Jul 2010 22:09:37 -0400 Original-Received: by vws1 with SMTP id 1so3435546vws.0 for ; Mon, 12 Jul 2010 19:09:36 -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=VGC6+LAhr06kFJAN6TYWRIrF2FrWVs07gtqJRUAF2V4=; b=HSLNRVxWPxRfY3vN1EDPaZktS79BEjejbC+ZTS83hlnfKoo5P1g4styuthjIXj5iAr 2KWuRlZXCM2hVxXc7bEibZuNuR5EQebS9RmbR0Z0NlrFmhycTnW+5TBSB0cqZKJQHAYT gzWVuloa7yHdx/5Q8STmK7LAjnfXCmHSPFVKo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hI8PlTTzN+wuCpy0DqJl2RfIxtZDaXHF3I0YQysGlcwYcl82LdhEctjWvGhBJJ4XgM NWHw70ib/8iok07G4RC4F1Tj0CYdh38ydQilOTiUAPWytUHRuIO7zHhn79Qsd1DXiIlN R/zVwjNZt5T2o7hOOFk3xomQY15xRVlPPZS5E= Original-Received: by 10.224.2.147 with SMTP id 19mr8297532qaj.59.1278986976362; Mon, 12 Jul 2010 19:09:36 -0700 (PDT) Original-Received: by 10.229.30.77 with HTTP; Mon, 12 Jul 2010 19:09:36 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127136 Archived-At: Typing a / in nxml-mode is supposed to indent the current line. Setting nxml-slash-auto-complete-flag incorrectly prevents that from happening. A patch is below. *** /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.