bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12743: 24.2.50; run-python hangs


From: Left Right
Subject: bug#12743: 24.2.50; run-python hangs
Date: Sat, 27 Oct 2012 17:57:39 +0200

Hello again,

I think I know what the problem is, but I don't know how to fix it:

(defun jit-lock-function (start)
  "Fontify current buffer starting at position START.
This function is added to `fontification-functions' when `jit-lock-mode'
is active."
  (when (and jit-lock-mode (not memory-full))
    (if (null jit-lock-defer-timer)
        ;; No deferral.
        (jit-lock-fontify-now start (+ start jit-lock-chunk-size))
      ;; Record the buffer for later fontification.
      (unless (memq (current-buffer) jit-lock-defer-buffers)
        (push (current-buffer) jit-lock-defer-buffers))
      ;; Mark the area as defer-fontified so that the redisplay engine
      ;; is happy and so that the idle timer can find the places to fontify.
      (with-buffer-prepared-for-jit-lock
       (put-text-property start
                          (next-single-property-change
                           start 'fontified nil
                           (min (point-max) (+ start jit-lock-chunk-size)))
                          'fontified 'defer)))))

There are 3 s-expressions inside (if ...), the third will never run,
but it probably has to. Maybe it should be (when ...) instead of (if
...)?

Best.

Oleg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]