Lennart Borgman <lennart.borgman at gmail.com>
authorGlenn Morris <rgm@gnu.org>
Tue, 2 Dec 2008 03:32:41 +0000 (03:32 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 2 Dec 2008 03:32:41 +0000 (03:32 +0000)
(nxml-indent-line): Don't re-indent lines that already have the
correct indentation.  (Bug#859)

lisp/nxml/nxml-mode.el

index 49dcaec..a2b20b2 100644 (file)
@@ -1370,7 +1370,8 @@ of the inserted start-tag or nil if none was inserted."
   "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")