]> code.delx.au - gnu-emacs/commitdiff
(jit-lock-fontify-now): Don't bind
authorGerd Moellmann <gerd@gnu.org>
Fri, 19 Jan 2001 16:19:07 +0000 (16:19 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 19 Jan 2001 16:19:07 +0000 (16:19 +0000)
font-lock-beginning-of-syntax-function to nil.

lisp/ChangeLog
lisp/jit-lock.el

index b215f8cded3e33c03cfb0ed1352fe471a33b4d57..019881fda1e64e61273ce2c8c21f65228f0a21f3 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-19  Gerd Moellmann  <gerd@gnu.org>
+
+       * jit-lock.el (jit-lock-fontify-now): Don't bind 
+       font-lock-beginning-of-syntax-function to nil.
+
 2001-01-19  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * mail/emacsbug.el (report-emacs-bug): Report values of
index 04fd77893db52e2e0c447576bb724bd15f25ae03..6b142997f5c9a362dd8b1f91884757e105c4d275 100644 (file)
@@ -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