Mercurial > emacs
changeset 35429:1798ff4517d3
(jit-lock-fontify-now): Don't bind
font-lock-beginning-of-syntax-function to nil.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 19 Jan 2001 16:16:52 +0000 |
parents | 96ba5877dbd8 |
children | 524f5e66187f |
files | lisp/jit-lock.el |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/jit-lock.el Fri Jan 19 16:15:51 2001 +0000 +++ b/lisp/jit-lock.el Fri Jan 19 16:16:52 2001 +0000 @@ -264,8 +264,15 @@ (widen) (unless start (setq start (point-min))) (setq end (if end (min end (point-max)) (point-max))) - (let ((font-lock-beginning-of-syntax-function nil) - next) + ;; This did bind `font-lock-beginning-of-syntax-function' to + ;; nil at some point, for an unknown reason. Don't do this; it + ;; can make highlighting slow due to expensive calls to + ;; `parse-partial-sexp' in function + ;; `font-lock-fontify-syntactically-region'. Example: paging + ;; from the end of a buffer to its start, can do repeated + ;; `parse-partial-sexp' starting from `point-min', which can + ;; take a long time in a large buffer. + (let (next) (save-match-data ;; Fontify chunks beginning at START. The end of a ;; chunk is either `end', or the start of a region