summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2005-09-01 14:04:03 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2005-09-01 14:04:03 +0000
commita9efeb1df80145553d3c0c6c8da51a8dae2fd8dc (patch)
tree9195494e72174f95b4ab16be33b75eea844ee95a /lisp/font-lock.el
parent07cb6bd44073691f708edfc1966f1b39839d02f2 (diff)
downloademacs-a9efeb1df80145553d3c0c6c8da51a8dae2fd8dc.tar.gz
(fast-lock, lazy-lock) <defgroup>: Remove.
(font-lock-lines-before): Change default to being inactive. (font-lock-after-change-function): Don't handle font-lock-lines-before here. (font-lock-default-fontify-region): Handle it here.
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el18
1 files changed, 4 insertions, 14 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index feed15f18d7..4c43d34dde7 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -224,17 +224,6 @@
(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)
;; User variables.
@@ -293,7 +282,7 @@ If a number, only buffers greater than this size have fontification messages."
(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
@@ -1049,6 +1038,8 @@ a very meaningful entity to highlight.")
;; 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
@@ -1105,8 +1096,7 @@ what properties to clear before refontifying a region.")
(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)