[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 03/03: [gnugo int] Drop abstractions: gnugo--{ERR-wait, gate-game
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 03/03: [gnugo int] Drop abstractions: gnugo--{ERR-wait, gate-game-over} |
Date: |
Sun, 27 Apr 2014 10:49:55 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 290b04f06dbcd438c99fd49bed7383e623de3017
Author: Thien-Thi Nguyen <address@hidden>
Date: Sun Apr 27 12:19:00 2014 +0200
[gnugo int] Drop abstractions: gnugo--{ERR-wait,gate-game-over}
* packages/gnugo/gnugo.el (gnugo--gate-game-over)
(gnugo--ERR-wait): Delete, incorporating them into...
(gnugo-gate): ...here.
---
packages/gnugo/gnugo.el | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 160cfa0..bf7b120 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -355,14 +355,6 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
(defsubst gnugo--prop<-color (color)
(if (gnugo--blackp color) :B :W))
-(defsubst gnugo--gate-game-over (enable)
- (when (and enable (gnugo-get :game-over))
- (user-error "Sorry, game over")))
-
-(defun gnugo--ERR-wait (color why)
- (user-error "%s -- please wait for \"(%s to play)\""
- why color))
-
(defun gnugo-gate (&optional in-progress-p)
(unless (gnugo-board-buffer-p)
(user-error "Wrong buffer -- try M-x gnugo"))
@@ -371,13 +363,15 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
(destructuring-bind (&optional color . suggestion)
(gnugo-get :waiting)
(when color
- (apply 'gnugo--ERR-wait
+ (apply 'user-error
+ "%s -- please wait for \"(%s to play)\""
(if suggestion
- (list color
- "Still thinking")
- (list (gnugo-other color)
- "Not your turn yet")))))
- (gnugo--gate-game-over in-progress-p))
+ (list "Still thinking"
+ color)
+ (list "Not your turn yet"
+ (gnugo-other color))))))
+ (when (and in-progress-p (gnugo-get :game-over))
+ (user-error "Sorry, game over")))
(defun gnugo-sentinel (proc string)
(let ((status (process-status proc)))