changeset 106873:8357132d4077

Fix return value of nxml-extend-after-change-region. * nxml/nxml-mode.el (nxml-extend-after-change-region): Never return t (Bug#3898).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 16 Jan 2010 17:24:05 -0500
parents a9f181d02023
children ab4dd366cab3 c29352449572 1789ed4b257e
files lisp/ChangeLog lisp/nxml/nxml-mode.el
diffstat 2 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jan 16 16:38:47 2010 -0500
+++ b/lisp/ChangeLog	Sat Jan 16 17:24:05 2010 -0500
@@ -1,3 +1,8 @@
+2010-01-16  Lennart Borgman  <lennart.borgman@gmail.com>
+
+	* nxml/nxml-mode.el (nxml-extend-after-change-region): Never
+	return t (Bug#3898).
+
 2010-01-16  Frédéric Perrin  <frederic.perrin@resel.fr>  (tiny change)
 
 	* vc-dispatcher.el (vc-do-command): Set LC_MESSAGES, so that we
--- a/lisp/nxml/nxml-mode.el	Sat Jan 16 16:38:47 2010 -0500
+++ b/lisp/nxml/nxml-mode.el	Sat Jan 16 17:24:05 2010 -0500
@@ -882,16 +882,17 @@
 (defun nxml-extend-after-change-region (start end pre-change-length)
   (unless nxml-degraded
     (setq nxml-last-fontify-end nil)
-
-    (nxml-with-degradation-on-error 'nxml-extend-after-change-region
-	(save-excursion
-	  (save-restriction
-	    (widen)
-	    (save-match-data
-	      (nxml-with-invisible-motion
-		(nxml-with-unmodifying-text-property-changes
-                  (nxml-extend-after-change-region1
-                   start end pre-change-length)))))))))
+    (let ((region (nxml-with-degradation-on-error
+		   'nxml-extend-after-change-region
+		   (save-excursion
+		     (save-restriction
+		       (widen)
+		       (save-match-data
+			 (nxml-with-invisible-motion
+			   (nxml-with-unmodifying-text-property-changes
+			     (nxml-extend-after-change-region1
+			      start end pre-change-length)))))))))
+      (if (consp region) region))))
 
 (defun nxml-extend-after-change-region1 (start end pre-change-length)
   (let* ((region (nxml-after-change1 start end pre-change-length))