aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-19 13:32:08 +0000
committerGerd Moellmann2001-01-19 13:32:08 +0000
commitf926102066802f69bf6d1be25cf8841f8be92cee (patch)
tree1bd3332595de8c1016917fcd06229d96abf002b8 /lisp
parentcd9b540f67f6c8eae61458275943048a460187e0 (diff)
downloademacs-f926102066802f69bf6d1be25cf8841f8be92cee.tar.gz
emacs-f926102066802f69bf6d1be25cf8841f8be92cee.zip
(font-lock-multiline): Default to nil.
(font-lock-default-fontify-region): If font-lock-multiline is nil, don't check the property `font-lock-multiline'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/font-lock.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index db1db262547..5316b110995 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1,6 +1,6 @@
1;;; font-lock.el --- Electric font lock mode 1;;; font-lock.el --- Electric font lock mode
2 2
3;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000 3;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: jwz, then rms, then sm 6;; Author: jwz, then rms, then sm
@@ -649,7 +649,7 @@ This is normally set via `font-lock-defaults'.")
649Currently, valid mode names are `fast-lock-mode', `jit-lock-mode' and 649Currently, valid mode names are `fast-lock-mode', `jit-lock-mode' and
650`lazy-lock-mode'. This is normally set via `font-lock-defaults'.") 650`lazy-lock-mode'. This is normally set via `font-lock-defaults'.")
651 651
652(defvar font-lock-multiline 'undecided 652(defvar font-lock-multiline nil
653 "Whether font-lock should cater to multiline keywords. 653 "Whether font-lock should cater to multiline keywords.
654If nil, don't try to handle multiline patterns. 654If nil, don't try to handle multiline patterns.
655If t, always handle multiline patterns. 655If t, always handle multiline patterns.
@@ -1203,7 +1203,8 @@ The value of this variable is used when Font Lock mode is turned on."
1203 (set-syntax-table font-lock-syntax-table)) 1203 (set-syntax-table font-lock-syntax-table))
1204 ;; check to see if we should expand the beg/end area for 1204 ;; check to see if we should expand the beg/end area for
1205 ;; proper multiline matches 1205 ;; proper multiline matches
1206 (when (and (> beg (point-min)) 1206 (when (and font-lock-multiline
1207 (> beg (point-min))
1207 (get-text-property (1- beg) 'font-lock-multiline)) 1208 (get-text-property (1- beg) 'font-lock-multiline))
1208 ;; We are just after or in a multiline match. 1209 ;; We are just after or in a multiline match.
1209 (setq beg (or (previous-single-property-change 1210 (setq beg (or (previous-single-property-change
@@ -1211,8 +1212,9 @@ The value of this variable is used when Font Lock mode is turned on."
1211 (point-min))) 1212 (point-min)))
1212 (goto-char beg) 1213 (goto-char beg)
1213 (setq beg (line-beginning-position))) 1214 (setq beg (line-beginning-position)))
1214 (setq end (or (text-property-any end (point-max) 1215 (setq end (or (and font-lock-multiline
1215 'font-lock-multiline nil) 1216 (text-property-any end (point-max)
1217 'font-lock-multiline nil))
1216 (point-max))) 1218 (point-max)))
1217 (goto-char end) 1219 (goto-char end)
1218 (setq end (line-beginning-position 2)) 1220 (setq end (line-beginning-position 2))