changeset 100112:d72f163ce147

Lennart Borgman <lennart.borgman at gmail.com> (nxml-indent-line): Don't re-indent lines that already have the correct indentation. (Bug#859)
author Glenn Morris <rgm@gnu.org>
date Tue, 02 Dec 2008 03:32:41 +0000
parents 70331b8d068a
children bd6671636b3b
files lisp/nxml/nxml-mode.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/nxml/nxml-mode.el	Tue Dec 02 03:32:05 2008 +0000
+++ b/lisp/nxml/nxml-mode.el	Tue Dec 02 03:32:41 2008 +0000
@@ -1370,7 +1370,8 @@
   "Indent current line as XML."
   (let ((indent (nxml-compute-indent))
 	(from-end (- (point-max) (point))))
-    (when indent
+    (when (and indent
+	       (/= indent (current-indentation)))
       (beginning-of-line)
       (let ((bol (point)))
 	(skip-chars-forward " \t")