[Top][All Lists]

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

bug#13999: 24.3.50; rng-validate-while-idle -> (error "Selecting deleted

From: Leo Liu
Subject: bug#13999: 24.3.50; rng-validate-while-idle -> (error "Selecting deleted buffer")
Date: Fri, 22 Mar 2013 22:39:29 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3)

On 2013-03-22 21:36 +0800, Stefan Monnier wrote:
>> The code in rng-valid.el uses the following idiom to redisplay without
>> triggering idle timers.
> Why does it need to do that?
>         Stefan

Does the following make any sense?

(defun rng-validate-while-idle-continue-p ()
  ;; input-pending-p and sit-for run timers that are
  ;; ripe.  Binding timer-idle-list to nil prevents
  ;; this.  If we don't do this, then any ripe timers
  ;; will get run, and we won't get any chance to
  ;; validate until Emacs becomes idle again or until
  ;; the other lower priority timers finish (which
  ;; can take a very long time in the case of
  ;; jit-lock).
  (let ((timer-idle-list nil))
    (and (not (input-pending-p))
         ;; Fake rng-validate-up-to-date-end so that the mode line
         ;; shows progress.  Also use this to save point.
         (let ((rng-validate-up-to-date-end (point)))
           (goto-char rng-validate-display-point)
           (when (not rng-validate-display-modified-p)
             (restore-buffer-modified-p nil))
           (let ((continue (sit-for 0)))
             (goto-char rng-validate-up-to-date-end)

reply via email to

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