aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2001-05-17 13:29:44 +0000
committerStefan Monnier2001-05-17 13:29:44 +0000
commitdf22166e1647234403f2363a764840001193dd0f (patch)
tree2b3ae53e840c3f55f3cb090c101cd9249ac7349a
parent357da0ed2fb5956fe8990a447c0aa30424f335f7 (diff)
downloademacs-df22166e1647234403f2363a764840001193dd0f.tar.gz
emacs-df22166e1647234403f2363a764840001193dd0f.zip
(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.
-rw-r--r--lisp/ChangeLog16
-rw-r--r--lisp/jit-lock.el15
2 files changed, 18 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc5e9071802..b28f19da1c5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12001-05-17 Stefan Monnier <monnier@cs.yale.edu>
2
3 * jit-lock.el (jit-lock-after-change): Check the font-lock-multiline
4 text-property after moving to the beginning of line and regardless
5 of the value of font-lock-multiline.
6
12001-05-17 Gerd Moellmann <gerd@gnu.org> 72001-05-17 Gerd Moellmann <gerd@gnu.org>
2 8
3 * startup.el (fancy-splash-screens): Ignore events on the mode-line. 9 * startup.el (fancy-splash-screens): Ignore events on the mode-line.
@@ -27,8 +33,8 @@
27 of `c'. 33 of `c'.
28 34
29 * textmodes/outline.el (outline-font-lock-level): Remove the 35 * textmodes/outline.el (outline-font-lock-level): Remove the
30 condition-case, test what outline-level returns instead, to ease 36 condition-case, test what outline-level returns instead, to
31 debugging. 37 ease debugging.
32 38
33 * international/mule.el (auto-coding-regexp-alist): New user-option. 39 * international/mule.el (auto-coding-regexp-alist): New user-option.
34 (auto-coding-from-file-contents): New function. 40 (auto-coding-from-file-contents): New function.
@@ -38,9 +44,9 @@
38 44
39 * mouse.el (mouse-delete-other-windows): Doc fix. 45 * mouse.el (mouse-delete-other-windows): Doc fix.
40 46
41 * emacs-lisp/lisp-mode.el (lisp-mode): Make 47 * emacs-lisp/lisp-mode.el (lisp-mode):
42 font-lock-keywords-case-fold-search a buffer-local variable 48 Make font-lock-keywords-case-fold-search a buffer-local variable with
43 with make-local-variable before setting it. 49 make-local-variable before setting it.
44 50
452001-05-14 Eli Zaretskii <eliz@is.elta.co.il> 512001-05-14 Eli Zaretskii <eliz@is.elta.co.il>
46 52
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."
426 (when jit-lock-mode 426 (when jit-lock-mode
427 (save-excursion 427 (save-excursion
428 (with-buffer-prepared-for-jit-lock 428 (with-buffer-prepared-for-jit-lock
429 ;; If we're in text that matches a multi-line font-lock pattern,
430 ;; make sure the whole text will be redisplayed.
431 (when (and font-lock-multiline
432 (get-text-property start 'font-lock-multiline))
433 (setq start (or (previous-single-property-change
434 start 'font-lock-multiline)
435 (point-min))))
436
437 ;; It's important that the `fontified' property be set from the 429 ;; It's important that the `fontified' property be set from the
438 ;; beginning of the line, else font-lock will properly change the 430 ;; beginning of the line, else font-lock will properly change the
439 ;; text's face, but the display will have been done already and will 431 ;; 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."
441 (goto-char start) 433 (goto-char start)
442 (setq start (line-beginning-position)) 434 (setq start (line-beginning-position))
443 435
436 ;; If we're in text that matches a multi-line font-lock pattern,
437 ;; make sure the whole text will be redisplayed.
438 (when (get-text-property start 'font-lock-multiline)
439 (setq start (or (previous-single-property-change
440 start 'font-lock-multiline)
441 (point-min))))
442
444 ;; Make sure we change at least one char (in case of deletions). 443 ;; Make sure we change at least one char (in case of deletions).
445 (setq end (min (max end (1+ start)) (point-max))) 444 (setq end (min (max end (1+ start)) (point-max)))
446 ;; Request refontification. 445 ;; Request refontification.