diff options
author | Glenn Morris <[email protected]> | 2014-06-25 18:59:37 -0400 |
---|---|---|
committer | Glenn Morris <[email protected]> | 2014-06-25 18:59:37 -0400 |
commit | f7586999d273558bdabedde5cde0f881ec0924b6 (patch) | |
tree | 220ce9aeb78f2cbc9390968d2fcb72549e531b00 /test | |
parent | 7e58d67392d5611cd205cc180ce64335b61afd5a (diff) |
* flymake-tests.el (flymake-tests--current-face): Tweak previous sleep change.
Using the time-honored principle of "if it doesn't when you do X,
do it again and see what happens".
Diffstat (limited to 'test')
-rw-r--r-- | test/automated/flymake-tests.el | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test/automated/flymake-tests.el b/test/automated/flymake-tests.el index 9869f699d2..e5f444e262 100644 --- a/test/automated/flymake-tests.el +++ b/test/automated/flymake-tests.el @@ -33,19 +33,16 @@ ;; Warning predicate (defun flymake-tests--current-face (file predicate) (let ((buffer (find-file-noselect - (expand-file-name file flymake-tests-data-directory)))) + (expand-file-name file flymake-tests-data-directory))) + (i 0)) (unwind-protect (with-current-buffer buffer (setq-local flymake-warning-predicate predicate) (goto-char (point-min)) (flymake-mode 1) - ;; XXX: is this reliable enough? - ;; By experiment, no it is not! - ;; For some reason, a single (sleep-for 1.0) does nothing here, - ;; but 2 * (sleep-for 0.5) works. - ;; FIXME what is going on...? - (sleep-for (+ 0.5 flymake-no-changes-timeout)) - (sleep-for (+ 0.5 flymake-no-changes-timeout)) + ;; Weirdness here... http://debbugs.gnu.org/17647#25 + (while (and flymake-is-running (< (setq i (1+ i)) 10)) + (sleep-for (+ 0.5 flymake-no-changes-timeout))) (flymake-goto-next-error) (face-at-point)) (and buffer (let (kill-buffer-query-functions) (kill-buffer buffer)))))) |