changeset 62864:a30c3081abf5

(jit-lock-function, jit-lock-after-change): Do nothing if memory is full.
author Richard M. Stallman <rms@gnu.org>
date Sun, 29 May 2005 08:40:37 +0000
parents 3c095150855a
children e4f3776e0a10
files lisp/jit-lock.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jit-lock.el	Sun May 29 08:39:40 2005 +0000
+++ b/lisp/jit-lock.el	Sun May 29 08:40:37 2005 +0000
@@ -298,7 +298,7 @@
   "Fontify current buffer starting at position START.
 This function is added to `fontification-functions' when `jit-lock-mode'
 is active."
-  (when jit-lock-mode
+  (when (and jit-lock-mode (not (memory-full-p)))
     (if (null jit-lock-defer-time)
 	;; No deferral.
 	(jit-lock-fontify-now start (+ start jit-lock-chunk-size))
@@ -540,7 +540,7 @@
 This function ensures that lines following the change will be refontified
 in case the syntax of those lines has changed.  Refontification
 will take place when text is fontified stealthily."
-  (when jit-lock-mode
+  (when (and jit-lock-mode (not (memory-full-p)))
     (save-excursion
       (with-buffer-prepared-for-jit-lock
        ;; It's important that the `fontified' property be set from the