emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 248/255: try to fix gnugo Emacs crashes


From: Eric Schulte
Subject: [elpa] 248/255: try to fix gnugo Emacs crashes
Date: Sun, 16 Mar 2014 01:02:57 +0000

eschulte pushed a commit to branch go
in repository elpa.

commit 80e132c2da182b7aef6ab6aac21e0aa1bf254c53
Author: Eric Schulte <address@hidden>
Date:   Sat Aug 24 17:02:31 2013 -0600

    try to fix gnugo Emacs crashes
---
 back-ends/gnugo.el |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/back-ends/gnugo.el b/back-ends/gnugo.el
index 0c909e4..7feefcc 100644
--- a/back-ends/gnugo.el
+++ b/back-ends/gnugo.el
@@ -74,13 +74,15 @@ For example, the following changes the level of gnugo.
   (gnugo-wait-for-output gnugo))
 
 (defun gnugo-wait-for-output (gnugo)
-  (with-current-buffer (buffer gnugo)
-    (while (progn
-            (goto-char comint-last-input-end)
-            (not (re-search-forward "^= *[^\000]+?\n\n" nil t)))
-      (when (re-search-forward "^? *\\([^\000]+?\\)\n\n" nil t)
-        (error (match-string 1)))
-      (accept-process-output (get-buffer-process (current-buffer))))))
+  (condition-case e
+      (with-current-buffer (buffer gnugo)
+        (while (progn
+                 (goto-char comint-last-input-end)
+                 (not (re-search-forward "^= *[^\000]+?\n\n" nil t)))
+          (when (re-search-forward "^? *\\([^\000]+?\\)\n\n" nil t)
+            (error (match-string 1)))
+          (accept-process-output (get-buffer-process (current-buffer)))))
+    (error (message "gnugo error: %S" e))))
 
 (defun gnugo-last-output (gnugo)
   (with-current-buffer (buffer gnugo)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]