bug#3898: 23.1.50; nxml-extend-after-change-region should not return t

Lennart Borgman <[email protected]>
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
When an error occurs in nxml-extend-after-change-region it returns t
which makes font-lock-extend-jit-lock-region-after-change to fail
since it expects a cons with two numbers or nil.

The patch below make the return value nil instead.

Index: nxml-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/nxml/nxml-mode.el,v
retrieving revision 1.18
diff -u -b -r1.18 nxml-mode.el
--- nxml-mode.el	5 Jan 2009 03:22:51 -0000	1.18
+++ nxml-mode.el	21 Jul 2009 18:07:03 -0000
@@ -883,7 +883,8 @@
   (unless nxml-degraded
     (setq nxml-last-fontify-end nil)

-    (nxml-with-degradation-on-error 'nxml-extend-after-change-region
+    (let ((ret (nxml-with-degradation-on-error
+                'nxml-extend-after-change-region
 	(save-excursion
 	  (save-restriction
 	    (widen)
@@ -892,6 +893,7 @@
 		(nxml-with-unmodifying-text-property-changes
                   (nxml-extend-after-change-region1
                    start end pre-change-length)))))))))
+      (when (listp ret) ret))))

 (defun nxml-extend-after-change-region1 (start end pre-change-length)
   (let* ((region (nxml-after-change1 start end pre-change-length))



In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-06-30
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.