changeset 37781:67b115277d7d

(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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 17 May 2001 13:26:22 +0000
parents b0a9cb7d2109
children 0c8944bd9aa8
files lisp/jit-lock.el
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jit-lock.el	Thu May 17 13:08:18 2001 +0000
+++ b/lisp/jit-lock.el	Thu May 17 13:26:22 2001 +0000
@@ -426,14 +426,6 @@
   (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 @@
        (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.