From 44a38782d85b44e5707cfc12db20483b3d7125ec Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 19 Nov 2014 09:09:10 +0900 Subject: [PATCH] Avoid use of discard-input. Fix #405. --- elisp/ghc-process.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/elisp/ghc-process.el b/elisp/ghc-process.el index 69cf75b..9fb92d8 100644 --- a/elisp/ghc-process.el +++ b/elisp/ghc-process.el @@ -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))