summaryrefslogtreecommitdiff
path: root/lisp/jit-lock.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-05-17 13:29:44 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-05-17 13:29:44 +0000
commitdf22166e1647234403f2363a764840001193dd0f (patch)
tree2b3ae53e840c3f55f3cb090c101cd9249ac7349a /lisp/jit-lock.el
parent357da0ed2fb5956fe8990a447c0aa30424f335f7 (diff)
downloademacs-df22166e1647234403f2363a764840001193dd0f.tar.gz
(jit-lock-after-change): Check the font-lock-multiline
text-property after moving to the beginning of line and regardless of the value of font-lock-multiline.
Diffstat (limited to 'lisp/jit-lock.el')
-rw-r--r--lisp/jit-lock.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 6b142997f5c..d406189f684 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -426,14 +426,6 @@ will take place when text is fontified stealthily."
(when jit-lock-mode
(save-excursion
(with-buffer-prepared-for-jit-lock
- ;; If we're in text that matches a multi-line font-lock pattern,
- ;; make sure the whole text will be redisplayed.
- (when (and font-lock-multiline
- (get-text-property start 'font-lock-multiline))
- (setq start (or (previous-single-property-change
- start 'font-lock-multiline)
- (point-min))))
-
;; It's important that the `fontified' property be set from the
;; beginning of the line, else font-lock will properly change the
;; text's face, but the display will have been done already and will
@@ -441,6 +433,13 @@ will take place when text is fontified stealthily."
(goto-char start)
(setq start (line-beginning-position))
+ ;; If we're in text that matches a multi-line font-lock pattern,
+ ;; make sure the whole text will be redisplayed.
+ (when (get-text-property start 'font-lock-multiline)
+ (setq start (or (previous-single-property-change
+ start 'font-lock-multiline)
+ (point-min))))
+
;; Make sure we change at least one char (in case of deletions).
(setq end (min (max end (1+ start)) (point-max)))
;; Request refontification.