summaryrefslogtreecommitdiff
path: root/chess-scid.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-16 04:36:39 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-16 04:36:39 -0400
commit33d57dc0f667c8d1168b46f9e73d9510d8c7e518 (patch)
treecf7c9db65b1f331b2830c13fc779170d80febdec /chess-scid.el
parent1ec887a67d8d13e9dad411c00b824f4a549c7abe (diff)
After a call to `chess-scid-get-result', clear the buffer so that we don't see
the prompt that was output after that command when we enter this function the second time.
Diffstat (limited to 'chess-scid.el')
-rw-r--r--chess-scid.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/chess-scid.el b/chess-scid.el
index 8da54a7..1881c2a 100644
--- a/chess-scid.el
+++ b/chess-scid.el
@@ -22,9 +22,10 @@
(chess-scid-send command)
(accept-process-output chess-scid-process)
(goto-char (point-max))
- (while (memq (char-before) '(? ?\t ?\n ?\r ?\%))
- (backward-char 1))
- (buffer-substring here (point))))
+ (skip-chars-backward " \t\n\r%")
+ (prog1
+ (buffer-substring here (point))
+ (erase-buffer))))
(defun chess-scid-handler (event &rest args)
(cond