aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-21 19:27:28 +0000
committerGerd Moellmann1999-08-21 19:27:28 +0000
commita4bda243d2c200d05a45754ddbb7db82b37e919c (patch)
tree875c1514919041caae4f786a9bb303b60bc50949
parentd39c88504e3c6b7a76895c200c2f1cf09f78b5b0 (diff)
downloademacs-a4bda243d2c200d05a45754ddbb7db82b37e919c.tar.gz
emacs-a4bda243d2c200d05a45754ddbb7db82b37e919c.zip
(jit-lock-function): Use line-beginning-position.
Don't unwind-protect font-lock-fontify-region.
-rw-r--r--lisp/jit-lock.el12
1 files changed, 2 insertions, 10 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index ffc4b1be3bc..d2e94fd69e4 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -268,18 +268,10 @@ is active."
268 ;; functions seem to expects this, if I believe 268 ;; functions seem to expects this, if I believe
269 ;; lazy-lock. 269 ;; lazy-lock.
270 (goto-char start) 270 (goto-char start)
271 (unless (bolp) 271 (setq start (line-beginning-position))
272 (beginning-of-line)
273 (setq start (point)))
274 272
275 ;; Fontify the chunk, and mark it as fontified. 273 ;; Fontify the chunk, and mark it as fontified.
276 (unwind-protect 274 (font-lock-fontify-region start end nil)
277 (font-lock-fontify-region start end nil))
278
279 ;; Even if we got an error above, mark the region as
280 ;; fontified. If we get an error now, we're
281 ;; probably getting the same error the next time we
282 ;; try, so it's moot to try again.
283 (add-text-properties start next '(fontified t)) 275 (add-text-properties start next '(fontified t))
284 276
285 ;; Find the start of the next chunk, if any. 277 ;; Find the start of the next chunk, if any.