summaryrefslogtreecommitdiff
path: root/lisp/nxml/nxml-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/nxml/nxml-mode.el')
-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))