diff lisp/font-lock.el @ 69499:caf8f09897bc

* font-lock.el (font-lock-lines-before): Delete variable, subsumed by the new extend-region feature. (font-lock-after-change-function): Update correspondingly. * jit-lock.el (jit-lock-after-change): Update correspondingly. * progmodes/grep.el (font-lock-lines-before): Don't disable. * modes.texi (Region to Fontify): Remove font-lock-lines-before.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 15 Mar 2006 22:26:09 +0000
parents 0c2790d73955
children 958e92b75789 b901f4f12f33 e3bacb89536a
line wrap: on
line diff
--- a/lisp/font-lock.el	Wed Mar 15 19:41:35 2006 +0000
+++ b/lisp/font-lock.el	Wed Mar 15 22:26:09 2006 +0000
@@ -281,12 +281,6 @@
 		 (other :tag "always" t)
 		 (integer :tag "size"))
   :group 'font-lock)
-
-(defcustom font-lock-lines-before 0
-  "*Number of lines before the changed text to include in refontification."
-  :type 'integer
-  :group 'font-lock
-  :version "22.1")
 
 
 ;; Originally these variable values were face names such as `bold' etc.
@@ -1098,9 +1092,8 @@
 	    ;; Fontify the region the major mode has specified.
 	    (setq beg (car region) end (cdr region))
 	  ;; Fontify the whole lines which enclose the region.
-	  (setq beg (progn (goto-char beg)
-			   (forward-line (- font-lock-lines-before)))
-		end (progn (goto-char end) (forward-line 1) (point))))
+	  (setq beg (progn (goto-char beg) (line-beginning-position))
+		end (progn (goto-char end) (line-beginning-position 2))))
 	(font-lock-fontify-region beg end)))))
 
 (defun font-lock-fontify-block (&optional arg)