;;; font-lock.el --- Electric font lock mode
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;; 2000, 2001, 2002, 2003, 2004 2005 Free Software Foundation, Inc.
+;; 2000, 2001, 2002, 2003, 2004 2005 Free Software Foundation, Inc.
;; Author: jwz, then rms, then sm
;; Maintainer: FSF
(defgroup font-lock-extra-types nil
"Extra mode-specific type names for highlighting declarations."
:group 'font-lock)
-
-;; Define support mode groups here to impose `font-lock' group order.
-(defgroup fast-lock nil
- "Font Lock support mode to cache fontification."
- :load 'fast-lock
- :group 'font-lock)
-
-(defgroup lazy-lock nil
- "Font Lock support mode to fontify lazily."
- :load 'lazy-lock
- :group 'font-lock)
\f
;; User variables.
(integer :tag "size"))
:group 'font-lock)
-(defcustom font-lock-lines-before 1
+(defcustom font-lock-lines-before 0
"*Number of lines before the changed text to include in refontification."
:type 'integer
:group 'font-lock
;; Use the fontification syntax table, if any.
(when font-lock-syntax-table
(set-syntax-table font-lock-syntax-table))
+ (goto-char beg)
+ (setq beg (line-beginning-position (- 1 font-lock-lines-before)))
;; check to see if we should expand the beg/end area for
;; proper multiline matches
(when (and font-lock-multiline
(save-match-data
;; Rescan between start of lines enclosing the region.
(font-lock-fontify-region
- (progn (goto-char beg)
- (forward-line (- font-lock-lines-before)) (point))
+ (progn (goto-char beg) (forward-line 0) (point))
(progn (goto-char end) (forward-line 1) (point)))))))
(defun font-lock-fontify-block (&optional arg)