aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-03-23 09:38:56 +0800
committerLeo Liu2013-03-23 09:38:56 +0800
commita320a2dbc9840dc1106f14b5f43b0ca0edf2a597 (patch)
treee5709b1d7f47d3627113783a368316eca9eac662
parente38e6780432ec53b3297354b04eb7ad8136dd358 (diff)
downloademacs-a320a2dbc9840dc1106f14b5f43b0ca0edf2a597.tar.gz
emacs-a320a2dbc9840dc1106f14b5f43b0ca0edf2a597.zip
* 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
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/nxml/rng-nxml.el4
-rw-r--r--lisp/nxml/rng-valid.el39
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 @@
12013-03-23 Leo Liu <sdl.web@gmail.com>
2
3 * nxml/rng-nxml.el (rng-set-state-after): Do not let-bind
4 timer-idle-list.
5
6 * nxml/rng-valid.el (rng-validate-while-idle-continue-p)
7 (rng-next-error-1, rng-previous-error-1): Do not let-bind
8 timer-idle-list. (Bug#13999)
9
12013-03-23 Juri Linkov <juri@jurta.org> 102013-03-23 Juri Linkov <juri@jurta.org>
2 11
3 * info.el (info-index-match): New face. 12 * 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."
380 (< rng-validate-up-to-date-end pos)) 380 (< rng-validate-up-to-date-end pos))
381 ;; Display percentage validated. 381 ;; Display percentage validated.
382 (force-mode-line-update) 382 (force-mode-line-update)
383 ;; Force redisplay but don't allow idle timers to run. 383 (sit-for 0))
384 (let ((timer-idle-list nil))
385 (sit-for 0)))
386 (message "Parsing...done")) 384 (message "Parsing...done"))
387 (save-excursion 385 (save-excursion
388 (save-restriction 386 (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'."
414(defvar rng-validate-display-modified-p nil) 414(defvar rng-validate-display-modified-p nil)
415 415
416(defun rng-validate-while-idle-continue-p () 416(defun rng-validate-while-idle-continue-p ()
417 ;; input-pending-p and sit-for run timers that are 417 (and (not (input-pending-p))
418 ;; ripe. Binding timer-idle-list to nil prevents 418 ;; Fake rng-validate-up-to-date-end so that the mode line
419 ;; this. If we don't do this, then any ripe timers 419 ;; shows progress. Also use this to save point.
420 ;; will get run, and we won't get any chance to 420 (let ((rng-validate-up-to-date-end (point)))
421 ;; validate until Emacs becomes idle again or until 421 (goto-char rng-validate-display-point)
422 ;; the other lower priority timers finish (which 422 (when (not rng-validate-display-modified-p)
423 ;; can take a very long time in the case of 423 (restore-buffer-modified-p nil))
424 ;; jit-lock). 424 (force-mode-line-update)
425 (let ((timer-idle-list nil)) 425 (let ((continue (sit-for 0)))
426 (and (not (input-pending-p)) 426 (goto-char rng-validate-up-to-date-end)
427 ;; Fake rng-validate-up-to-date-end so that the mode line 427 continue))))
428 ;; shows progress. Also use this to save point.
429 (let ((rng-validate-up-to-date-end (point)))
430 (goto-char rng-validate-display-point)
431 (when (not rng-validate-display-modified-p)
432 (restore-buffer-modified-p nil))
433 (force-mode-line-update)
434 (let ((continue (sit-for 0)))
435 (goto-char rng-validate-up-to-date-end)
436 continue)))))
437 428
438;; Calling rng-do-some-validation once with a continue-p function, as 429;; Calling rng-do-some-validation once with a continue-p function, as
439;; opposed to calling it repeatedly, helps on initial validation of a 430;; opposed to calling it repeatedly, helps on initial validation of a
@@ -880,9 +871,7 @@ means goto the first error."
880 (< rng-validate-up-to-date-end (point-max))) 871 (< rng-validate-up-to-date-end (point-max)))
881 ;; Display percentage validated. 872 ;; Display percentage validated.
882 (force-mode-line-update) 873 (force-mode-line-update)
883 ;; Force redisplay but don't allow idle timers to run. 874 (sit-for 0)
884 (let ((timer-idle-list nil))
885 (sit-for 0))
886 (setq pos 875 (setq pos
887 (max pos (1- rng-validate-up-to-date-end))) 876 (max pos (1- rng-validate-up-to-date-end)))
888 t))))) 877 t)))))
@@ -905,9 +894,7 @@ means goto the first error."
905 (while (and (rng-do-some-validation) 894 (while (and (rng-do-some-validation)
906 (< rng-validate-up-to-date-end (min pos (point-max)))) 895 (< rng-validate-up-to-date-end (min pos (point-max))))
907 (force-mode-line-update) 896 (force-mode-line-update)
908 ;; Force redisplay but don't allow idle timers to run. 897 (sit-for 0))
909 (let ((timer-idle-list nil))
910 (sit-for 0)))
911 (while (and (> arg 0) 898 (while (and (> arg 0)
912 (setq err (rng-find-previous-error-overlay pos))) 899 (setq err (rng-find-previous-error-overlay pos)))
913 (setq pos (overlay-start err)) 900 (setq pos (overlay-start err))