From: Gerd Moellmann Date: Fri, 19 Jan 2001 16:19:07 +0000 (+0000) Subject: (jit-lock-fontify-now): Don't bind X-Git-Tag: emacs-pretest-21.0.96~194 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9724173bef67aad346c9a25442b15423cc453cfc;p=emacs.git (jit-lock-fontify-now): Don't bind font-lock-beginning-of-syntax-function to nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b215f8cded3..019881fda1e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-01-19 Gerd Moellmann + + * jit-lock.el (jit-lock-fontify-now): Don't bind + font-lock-beginning-of-syntax-function to nil. + 2001-01-19 Eli Zaretskii * mail/emacsbug.el (report-emacs-bug): Report values of diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 04fd77893db..6b142997f5c 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -264,8 +264,15 @@ Defaults to the whole buffer. END can be out of bounds." (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