checking if the buffer exists (#256).

This commit is contained in:
Kazu Yamamoto
2014-05-14 05:05:49 +09:00
parent e9f38f10a2
commit ce28a67e28
3 changed files with 15 additions and 7 deletions

View File

@@ -36,7 +36,7 @@
(buf (get-buffer-create (concat " ghc-modi:" name)))
(file (buffer-file-name))
(cpro (get-process name)))
(with-current-buffer buf
(ghc-with-current-buffer buf
(unless ghc-process-running
(setq ghc-process-running t)
(setq ghc-process-original-buffer cbuf)
@@ -69,7 +69,7 @@
pro))
(defun ghc-process-filter (process string)
(with-current-buffer (process-buffer process)
(ghc-with-current-buffer (process-buffer process)
(goto-char (point-max))
(insert string)
(forward-line -1)
@@ -110,7 +110,7 @@
;; (discard-input) avoids getting stuck.
(discard-input))
(quit
(with-current-buffer (process-buffer pro)
(ghc-with-current-buffer (process-buffer pro)
(setq ghc-process-running nil)))))
ghc-process-results)