Avoid use of discard-input. Fix #405.

This commit is contained in:
Kazu Yamamoto 2014-11-19 09:09:10 +09:00
parent 4f768a8bdf
commit 44a38782d8

View File

@ -112,12 +112,8 @@
(setq ghc-process-num-of-results (or n 1))
(let ((pro (ghc-with-process cmd 'ghc-process-callback nil hook)))
(condition-case nil
(while (null ghc-process-rendezvous)
;; 0.01 is too fast for Emacs 24.4.
;; (sit-for 0.1 t) may get stuck when tooltip is displayed.
(sit-for 0.1)
;; (discard-input) avoids getting stuck.
(discard-input))
(while (and (null ghc-process-rendezvous)
(accept-process-output pro 2)))
(quit
(setq ghc-process-running nil))))
ghc-process-results))