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