From a320a2dbc9840dc1106f14b5f43b0ca0edf2a597 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 23 Mar 2013 09:38:56 +0800 Subject: [PATCH] * lisp/nxml/rng-nxml.el (rng-set-state-after): Do not let-bind timer-idle-list. * lisp/nxml/rng-valid.el (rng-validate-while-idle-continue-p) (rng-next-error-1, rng-previous-error-1): Do not let-bind timer-idle-list. Fixes: debbugs:13999 --- lisp/ChangeLog | 9 +++++++++ lisp/nxml/rng-nxml.el | 4 +--- lisp/nxml/rng-valid.el | 39 +++++++++++++-------------------------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 966bbb1367c..f79c533465e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2013-03-23 Leo Liu + + * nxml/rng-nxml.el (rng-set-state-after): Do not let-bind + timer-idle-list. + + * nxml/rng-valid.el (rng-validate-while-idle-continue-p) + (rng-next-error-1, rng-previous-error-1): Do not let-bind + timer-idle-list. (Bug#13999) + 2013-03-23 Juri Linkov * info.el (info-index-match): New face. diff --git a/lisp/nxml/rng-nxml.el b/lisp/nxml/rng-nxml.el index cfb8e33cccb..bc070136adb 100644 --- a/lisp/nxml/rng-nxml.el +++ b/lisp/nxml/rng-nxml.el @@ -380,9 +380,7 @@ set `xmltok-dtd'. Returns the position of the end of the token." (< rng-validate-up-to-date-end pos)) ;; Display percentage validated. (force-mode-line-update) - ;; Force redisplay but don't allow idle timers to run. - (let ((timer-idle-list nil)) - (sit-for 0))) + (sit-for 0)) (message "Parsing...done")) (save-excursion (save-restriction diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el index a87ab2532ce..9ba2e987718 100644 --- a/lisp/nxml/rng-valid.el +++ b/lisp/nxml/rng-valid.el @@ -414,26 +414,17 @@ The schema is set like `rng-auto-set-schema'." (defvar rng-validate-display-modified-p nil) (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)) - (force-mode-line-update) - (let ((continue (sit-for 0))) - (goto-char rng-validate-up-to-date-end) - continue))))) + (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)) + (force-mode-line-update) + (let ((continue (sit-for 0))) + (goto-char rng-validate-up-to-date-end) + continue)))) ;; Calling rng-do-some-validation once with a continue-p function, as ;; opposed to calling it repeatedly, helps on initial validation of a @@ -880,9 +871,7 @@ means goto the first error." (< rng-validate-up-to-date-end (point-max))) ;; Display percentage validated. (force-mode-line-update) - ;; Force redisplay but don't allow idle timers to run. - (let ((timer-idle-list nil)) - (sit-for 0)) + (sit-for 0) (setq pos (max pos (1- rng-validate-up-to-date-end))) t))))) @@ -905,9 +894,7 @@ means goto the first error." (while (and (rng-do-some-validation) (< rng-validate-up-to-date-end (min pos (point-max)))) (force-mode-line-update) - ;; Force redisplay but don't allow idle timers to run. - (let ((timer-idle-list nil)) - (sit-for 0))) + (sit-for 0)) (while (and (> arg 0) (setq err (rng-find-previous-error-overlay pos))) (setq pos (overlay-start err)) -- 2.39.2