GNU bug report logs - #859
23.0.60; nxml-indent-line modifies the buffer

Previous Next

Package: emacs;

Reported by: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>

Date: Mon, 1 Sep 2008 23:45:04 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 859 in the body.
You can then email your comments to 859 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#859; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; nxml-indent-line modifies the buffer
Date: Tue, 02 Sep 2008 01:38:21 +0200
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'




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 859-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 859-done <at> debbugs.gnu.org
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 <at> gmail.com>

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 30 Dec 2008 15:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.