Mercurial > emacs
changeset 60686:8680359f80e1
(font-lock-lines-before): New user option.
(font-lock-after-change-function): Obey it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 17 Mar 2005 23:44:19 +0000 |
parents | 08055baffb97 |
children | fddbd6936582 |
files | lisp/font-lock.el |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/font-lock.el Thu Mar 17 23:43:17 2005 +0000 +++ b/lisp/font-lock.el Thu Mar 17 23:44:19 2005 +0000 @@ -292,6 +292,12 @@ (other :tag "always" t) (integer :tag "size")) :group 'font-lock) + +(defcustom font-lock-lines-before 1 + "*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. @@ -1062,7 +1068,8 @@ (save-match-data ;; Rescan between start of lines enclosing the region. (font-lock-fontify-region - (progn (goto-char beg) (beginning-of-line) (point)) + (progn (goto-char beg) + (forward-line (- font-lock-lines-before)) (point)) (progn (goto-char end) (forward-line 1) (point))))))) (defun font-lock-fontify-block (&optional arg)