From 2db2358a98e15b802ab8d7439be3044a25e568b8 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 28 Mar 2014 15:05:14 +0900 Subject: [PATCH] fixing a bug of ghc-debug. --- elisp/ghc-process.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/elisp/ghc-process.el b/elisp/ghc-process.el index 02e0349..d342318 100644 --- a/elisp/ghc-process.el +++ b/elisp/ghc-process.el @@ -49,8 +49,9 @@ (let ((pro (ghc-get-process cpro name buf)) (cmd (funcall send))) (process-send-string pro cmd) - (ghc-with-debug-buffer - (insert (format "%% %s" cmd))))))))) + (when ghc-debug + (ghc-with-debug-buffer + (insert (format "%% %s" cmd)))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -77,9 +78,10 @@ (when (looking-at "^\\(OK\\|NG\\)$") (goto-char (point-min)) (funcall ghc-process-callback) - (let ((cbuf (current-buffer))) - (ghc-with-debug-buffer - (insert-buffer-substring cbuf))) + (when ghc-debug + (let ((cbuf (current-buffer))) + (ghc-with-debug-buffer + (insert-buffer-substring cbuf)))) (setq ghc-process-running nil)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;