]> code.delx.au - gnu-emacs/commitdiff
* font-lock.el (font-lock-lines-before): Delete variable, subsumed by
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 15 Mar 2006 22:26:09 +0000 (22:26 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 15 Mar 2006 22:26:09 +0000 (22:26 +0000)
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.

etc/NEWS
lisp/ChangeLog
lisp/font-lock.el
lisp/jit-lock.el
lisp/progmodes/grep.el
lispref/ChangeLog
lispref/modes.texi

index b7d93fe51bb86f40515def95a664d148a21f70f5..d273654500c3a029fdffa618ede3c7f641bcd326 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -872,11 +872,6 @@ The variable `Info-fontify' is no longer applicable; to disable
 fontification in Info, remove `turn-on-font-lock' from
 `Info-mode-hook'.
 
-+++
-*** font-lock-lines-before specifies a number of lines before the
-current line that should be refontified when you change the buffer.
-The default value is 1.
-
 +++
 *** font-lock: in modes like C and Lisp where the fontification assumes that
 an open-paren in column 0 is always outside of any string or comment,
index ea75ff76f4475c38ce523a8b1734535400390bd2..840fef7fb816653143c16086671f77b8ba7cdfdb 100644 (file)
@@ -1,3 +1,11 @@
+2006-03-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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.
+
 2006-03-15  Bill Wohler  <wohler@newt.com>
 
        * image.el (image-load-path-for-library): Fix example by not
index bae492509ecbad863be590061e30912cd496eaf0..d3017e3b3f352daa4914103495f979bb877c3b9d 100644 (file)
@@ -281,12 +281,6 @@ If a number, only buffers greater than this size have fontification messages."
                 (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")
 \f
 
 ;; Originally these variable values were face names such as `bold' etc.
@@ -1098,9 +1092,8 @@ what properties to clear before refontifying a region.")
            ;; 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)
index f82ead462f02a6e37652aa89186b88d19d60c5ab..84e0dc0cab3164561f738f652e0d198632c3dc71 100644 (file)
@@ -571,7 +571,7 @@ will take place when text is fontified stealthily."
         (setq start (if region
                         (car region)
                       (goto-char start)
-                      (line-beginning-position (- 1 font-lock-lines-before))))
+                      (line-beginning-position)))
 
         ;; If we're in text that matches a multi-line font-lock pattern,
         ;; make sure the whole text will be redisplayed.
index 0e151ce9be22a239098f90fc1f4d24d5eace3e9a..6afa3f293489b3313a985bb5cdc10168b7cd6270 100644 (file)
@@ -33,8 +33,6 @@
 
 (require 'compile)
 
-(defvar font-lock-lines-before)
-
 
 (defgroup grep nil
   "Run compiler as inferior of Emacs, parse error messages."
@@ -536,10 +534,7 @@ temporarily highlight in visited source lines."
        grep-regexp-alist)
   (set (make-local-variable 'compilation-process-setup-function)
        'grep-process-setup)
-  (set (make-local-variable 'compilation-disable-input) t)
-  ;; Set `font-lock-lines-before' to 0 to not refontify the previous
-  ;; line where grep markers may be already removed.
-  (set (make-local-variable 'font-lock-lines-before) 0))
+  (set (make-local-variable 'compilation-disable-input) t))
 
 ;;;###autoload
 (defun grep-find (command-args)
index 70df1ae03f49bf054ae3cd8b6ae2e74300f1329a..1ea4a73365c9376632e1150ec2b309961d265b7a 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * modes.texi (Region to Fontify): Remove font-lock-lines-before.
+
 2006-03-15  Bill Wohler  <wohler@newt.com>
 
        * display.texi (Defining Images): Fix example in
@@ -14,7 +18,7 @@
 
        * modes.texi: New node, "Region to Fontify" (for Font Lock).
        This describes font-lock-extend-region-function.
-       ("Other Font Lock Variables"): move "font-lock-lines-before" to
+       ("Other Font Lock Variables"): Move "font-lock-lines-before" to
        the new node "Region to Fontify".
 
 2006-03-13  Richard Stallman  <rms@gnu.org>
 
 2006-02-16  Johan Bockg\e,Ae\e(Brd  <bojohan@dd.chalmers.se>
 
-       * display.texi (Other Display Specs, Image Descriptors): Revert
-       erroneous changes.  The previous description of image-descriptors
-       as `(image . PROPS)' was correct.
+       * display.texi (Other Display Specs, Image Descriptors):
+       Revert erroneous changes.  The previous description of
+       image-descriptors as `(image . PROPS)' was correct.
 
 2006-02-14  Richard M. Stallman  <rms@gnu.org>
 
 
 2006-01-29  Chong Yidong  <cyd@stupidchicken.com>
 
-       * display.texi (Other Display Specs, Image Descriptors): Image
-       description is a list, not a cons cell.
+       * display.texi (Other Display Specs, Image Descriptors):
+       Image description is a list, not a cons cell.
 
 2006-01-28  Luc Teirlinck  <teirllm@auburn.edu>
 
index e15392ac85a480c19d58d78e35d72b43fd70c7b1..fc1953d24d9819de55ad5494bd88053a2f4c930a 100644 (file)
@@ -2731,16 +2731,6 @@ on an earlier line.
 You can enlarge (or even reduce) the region to fontify by setting either
 of the following variables:
 
-@defvar font-lock-lines-before
-This variable specifies the number of extra lines to consider when
-refontifying the buffer after each text change.  Font lock begins
-refontifying from that number of lines before the changed region.  The
-default is 0, but using a larger value can be useful for coping with
-multi-line patterns.  This variable is ignored whenever
-@code{font-lock-extend-region-function} is set and returns a
-non-@code{nil} value.
-@end defvar
-
 @defvar font-lock-extend-region-function
 This buffer-local variable is either @code{nil} or is a function that
 determines the region to fontify, which Emacs then calls after each