aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-09-01 14:04:03 +0000
committerStefan Monnier2005-09-01 14:04:03 +0000
commita9efeb1df80145553d3c0c6c8da51a8dae2fd8dc (patch)
tree9195494e72174f95b4ab16be33b75eea844ee95a
parent07cb6bd44073691f708edfc1966f1b39839d02f2 (diff)
downloademacs-a9efeb1df80145553d3c0c6c8da51a8dae2fd8dc.tar.gz
emacs-a9efeb1df80145553d3c0c6c8da51a8dae2fd8dc.zip
(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.
-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 @@
224(defgroup font-lock-extra-types nil 224(defgroup font-lock-extra-types nil
225 "Extra mode-specific type names for highlighting declarations." 225 "Extra mode-specific type names for highlighting declarations."
226 :group 'font-lock) 226 :group 'font-lock)
227
228;; Define support mode groups here to impose `font-lock' group order.
229(defgroup fast-lock nil
230 "Font Lock support mode to cache fontification."
231 :load 'fast-lock
232 :group 'font-lock)
233
234(defgroup lazy-lock nil
235 "Font Lock support mode to fontify lazily."
236 :load 'lazy-lock
237 :group 'font-lock)
238 227
239;; User variables. 228;; User variables.
240 229
@@ -293,7 +282,7 @@ If a number, only buffers greater than this size have fontification messages."
293 (integer :tag "size")) 282 (integer :tag "size"))
294 :group 'font-lock) 283 :group 'font-lock)
295 284
296(defcustom font-lock-lines-before 1 285(defcustom font-lock-lines-before 0
297 "*Number of lines before the changed text to include in refontification." 286 "*Number of lines before the changed text to include in refontification."
298 :type 'integer 287 :type 'integer
299 :group 'font-lock 288 :group 'font-lock
@@ -1049,6 +1038,8 @@ a very meaningful entity to highlight.")
1049 ;; Use the fontification syntax table, if any. 1038 ;; Use the fontification syntax table, if any.
1050 (when font-lock-syntax-table 1039 (when font-lock-syntax-table
1051 (set-syntax-table font-lock-syntax-table)) 1040 (set-syntax-table font-lock-syntax-table))
1041 (goto-char beg)
1042 (setq beg (line-beginning-position (- 1 font-lock-lines-before)))
1052 ;; check to see if we should expand the beg/end area for 1043 ;; check to see if we should expand the beg/end area for
1053 ;; proper multiline matches 1044 ;; proper multiline matches
1054 (when (and font-lock-multiline 1045 (when (and font-lock-multiline
@@ -1105,8 +1096,7 @@ what properties to clear before refontifying a region.")
1105 (save-match-data 1096 (save-match-data
1106 ;; Rescan between start of lines enclosing the region. 1097 ;; Rescan between start of lines enclosing the region.
1107 (font-lock-fontify-region 1098 (font-lock-fontify-region
1108 (progn (goto-char beg) 1099 (progn (goto-char beg) (forward-line 0) (point))
1109 (forward-line (- font-lock-lines-before)) (point))
1110 (progn (goto-char end) (forward-line 1) (point))))))) 1100 (progn (goto-char end) (forward-line 1) (point)))))))
1111 1101
1112(defun font-lock-fontify-block (&optional arg) 1102(defun font-lock-fontify-block (&optional arg)