bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#859: marked as done (23.0.60; nxml-indent-line modifies the buffer)


From: Emacs bug Tracking System
Subject: bug#859: marked as done (23.0.60; nxml-indent-line modifies the buffer)
Date: Mon, 1 Dec 2008 19:50:03 -0800

Your message dated Mon, 1 Dec 2008 22:42:49 -0500
with message-id <18740.44729.370117.362913@fencepost.gnu.org>
and subject line Re: 23.0.60; nxml-indent-line modifies the buffer
has caused the Emacs bug report #859,
regarding 23.0.60; nxml-indent-line modifies the buffer
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
859: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=859
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
--- Begin Message --- Subject: 23.0.60; nxml-indent-line modifies the buffer Date: Tue, 02 Sep 2008 01:38:21 +0200 User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
nxml-indent-line modifies the buffer even if the current indentation is
the same as the one it will give.

I am not sure what the right fix for this is. It uses indent-to and
perhaps the best would be that indent-to did not modify the buffer.

Otherwise the only change needed in nxml-indent-line is to add a check:

(defun nxml-indent-line ()
  "Indent current line as XML."
  (let ((indent (nxml-compute-indent))
        (from-end (- (point-max) (point))))
    (when (and indent
               (/= indent (current-indentation)))
      (beginning-of-line)
      (let ((bol (point)))
        (skip-chars-forward " \t")
        (delete-region bol (point)))
      (indent-to indent)
      (when (> (- (point-max) from-end) (point))
        (goto-char (- (point-max) from-end))))))



In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-08-29
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'



--- End Message ---
--- Begin Message --- Subject: Re: 23.0.60; nxml-indent-line modifies the buffer Date: Mon, 1 Dec 2008 22:42:49 -0500
2008-12-02  Lennart Borgman  <lennart.borgman@gmail.com>

    * nxml/nxml-mode.el (nxml-indent-line): Don't re-indent lines that
    already have the correct indentation.  (Bug#859)


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]