Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
69498:b17150b61168 | 69499:caf8f09897bc |
---|---|
279 If a number, only buffers greater than this size have fontification messages." | 279 If a number, only buffers greater than this size have fontification messages." |
280 :type '(choice (const :tag "never" nil) | 280 :type '(choice (const :tag "never" nil) |
281 (other :tag "always" t) | 281 (other :tag "always" t) |
282 (integer :tag "size")) | 282 (integer :tag "size")) |
283 :group 'font-lock) | 283 :group 'font-lock) |
284 | |
285 (defcustom font-lock-lines-before 0 | |
286 "*Number of lines before the changed text to include in refontification." | |
287 :type 'integer | |
288 :group 'font-lock | |
289 :version "22.1") | |
290 | 284 |
291 | 285 |
292 ;; Originally these variable values were face names such as `bold' etc. | 286 ;; Originally these variable values were face names such as `bold' etc. |
293 ;; Now we create our own faces, but we keep these variables for compatibility | 287 ;; Now we create our own faces, but we keep these variables for compatibility |
294 ;; and they give users another mechanism for changing face appearance. | 288 ;; and they give users another mechanism for changing face appearance. |
1096 (save-match-data | 1090 (save-match-data |
1097 (if region | 1091 (if region |
1098 ;; Fontify the region the major mode has specified. | 1092 ;; Fontify the region the major mode has specified. |
1099 (setq beg (car region) end (cdr region)) | 1093 (setq beg (car region) end (cdr region)) |
1100 ;; Fontify the whole lines which enclose the region. | 1094 ;; Fontify the whole lines which enclose the region. |
1101 (setq beg (progn (goto-char beg) | 1095 (setq beg (progn (goto-char beg) (line-beginning-position)) |
1102 (forward-line (- font-lock-lines-before))) | 1096 end (progn (goto-char end) (line-beginning-position 2)))) |
1103 end (progn (goto-char end) (forward-line 1) (point)))) | |
1104 (font-lock-fontify-region beg end))))) | 1097 (font-lock-fontify-region beg end))))) |
1105 | 1098 |
1106 (defun font-lock-fontify-block (&optional arg) | 1099 (defun font-lock-fontify-block (&optional arg) |
1107 "Fontify some lines the way `font-lock-fontify-buffer' would. | 1100 "Fontify some lines the way `font-lock-fontify-buffer' would. |
1108 The lines could be a function or paragraph, or a specified number of lines. | 1101 The lines could be a function or paragraph, or a specified number of lines. |