summaryrefslogtreecommitdiff
path: root/lisp/nxml
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-01-16 17:24:05 -0500
committerChong Yidong <cyd@stupidchicken.com>2010-01-16 17:24:05 -0500
commit116bd1ee3b91b4b9ad2361f689f2c47e09839591 (patch)
treef53168f085bca95f25e48f7ff283462022078f3c /lisp/nxml
parent2784cd7a6b047d2b4f7b90825b03bf54de6d5a52 (diff)
downloademacs-116bd1ee3b91b4b9ad2361f689f2c47e09839591.tar.gz
emacs-116bd1ee3b91b4b9ad2361f689f2c47e09839591.tar.bz2
emacs-116bd1ee3b91b4b9ad2361f689f2c47e09839591.zip
Fix return value of nxml-extend-after-change-region.
* nxml/nxml-mode.el (nxml-extend-after-change-region): Never return t (Bug#3898).
Diffstat (limited to 'lisp/nxml')
-rw-r--r--lisp/nxml/nxml-mode.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index 9fefd304b44..8bcde7a3a22 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -882,16 +882,17 @@ Called with `font-lock-beg' and `font-lock-end' dynamically bound."
(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))