diff options
| author | Stefan Monnier | 2005-10-21 17:41:54 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-10-21 17:41:54 +0000 |
| commit | 5ae158bf21d620f7c0d275e8b9719ad0c6df156a (patch) | |
| tree | 97f94833de369fbbd0a16ed0a3ba783b16ddeea6 | |
| parent | 45158e77762545109935cad79450d0cda8905976 (diff) | |
| download | emacs-5ae158bf21d620f7c0d275e8b9719ad0c6df156a.tar.gz emacs-5ae158bf21d620f7c0d275e8b9719ad0c6df156a.zip | |
(font-lock-default-fontify-region): Check the multiline
property independently from the font-lock-multiline variable.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/font-lock.el | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 219fbe0213a..2a83266af32 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-10-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * font-lock.el (font-lock-default-fontify-region): Check the multiline | ||
| 4 | property independently from the font-lock-multiline variable. | ||
| 5 | |||
| 1 | 2005-10-21 Richard M. Stallman <rms@gnu.org> | 6 | 2005-10-21 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/find-func.el (find-library-name): Doc fix. | 8 | * emacs-lisp/find-func.el (find-library-name): Doc fix. |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 77e20d5d026..ed8e7143b25 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1048,8 +1048,7 @@ a very meaningful entity to highlight.") | |||
| 1048 | (setq beg (line-beginning-position (- 1 font-lock-lines-before))) | 1048 | (setq beg (line-beginning-position (- 1 font-lock-lines-before))) |
| 1049 | ;; check to see if we should expand the beg/end area for | 1049 | ;; check to see if we should expand the beg/end area for |
| 1050 | ;; proper multiline matches | 1050 | ;; proper multiline matches |
| 1051 | (when (and font-lock-multiline | 1051 | (when (and (> beg (point-min)) |
| 1052 | (> beg (point-min)) | ||
| 1053 | (get-text-property (1- beg) 'font-lock-multiline)) | 1052 | (get-text-property (1- beg) 'font-lock-multiline)) |
| 1054 | ;; We are just after or in a multiline match. | 1053 | ;; We are just after or in a multiline match. |
| 1055 | (setq beg (or (previous-single-property-change | 1054 | (setq beg (or (previous-single-property-change |
| @@ -1057,10 +1056,9 @@ a very meaningful entity to highlight.") | |||
| 1057 | (point-min))) | 1056 | (point-min))) |
| 1058 | (goto-char beg) | 1057 | (goto-char beg) |
| 1059 | (setq beg (line-beginning-position))) | 1058 | (setq beg (line-beginning-position))) |
| 1060 | (when font-lock-multiline | 1059 | (setq end (or (text-property-any end (point-max) |
| 1061 | (setq end (or (text-property-any end (point-max) | 1060 | 'font-lock-multiline nil) |
| 1062 | 'font-lock-multiline nil) | 1061 | (point-max))) |
| 1063 | (point-max)))) | ||
| 1064 | (goto-char end) | 1062 | (goto-char end) |
| 1065 | ;; Round up to a whole line. | 1063 | ;; Round up to a whole line. |
| 1066 | (unless (bolp) (setq end (line-beginning-position 2))) | 1064 | (unless (bolp) (setq end (line-beginning-position 2))) |