From 33d57dc0f667c8d1168b46f9e73d9510d8c7e518 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 16 Sep 2008 04:36:39 -0400 Subject: 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. --- chess-scid.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'chess-scid.el') 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 -- cgit v1.2.3