[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 154/255: don't quit main back-end when quitting a board
From: |
Eric Schulte |
Subject: |
[elpa] 154/255: don't quit main back-end when quitting a board |
Date: |
Sun, 16 Mar 2014 01:02:38 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit 08ad8cdde661fd9dda33566920c42466db6b0111
Author: Eric Schulte <address@hidden>
Date: Sun Jun 3 11:44:21 2012 -0600
don't quit main back-end when quitting a board
---
go-board.el | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/go-board.el b/go-board.el
index a946a92..a36884a 100644
--- a/go-board.el
+++ b/go-board.el
@@ -251,11 +251,16 @@
;;; User input
+(defmacro with-trackers (sym &rest body)
+ (declare (indent 1))
+ `(ignoring-unsupported
+ (mapcar (lambda (tr) (let ((,sym tr)) ,@body)) *trackers*)))
+
(defmacro with-backends (sym &rest body)
(declare (indent 1))
`(ignoring-unsupported
(prog1 (let ((,sym *back-end*)) ,@body)
- (mapcar (lambda (tr) (let ((,sym tr)) ,@body)) *trackers*))))
+ (with-trackers ,sym ,@body))))
(defvar go-board-actions '(move resign undo comment)
"List of actions which may be taken on an GO board.")
@@ -323,7 +328,7 @@
(message "pass")
(apply-turn-to-board
(cons move (ignoring-unsupported (go-labels *back-end*)))))
- (mapcar (lambda (tr) (setf (go-move tr) move)) *trackers*)
+ (with-trackers tr (setf (go-move tr) move))
(goto-char (point-of-pos (cddr move))))
(setf *turn* (other-color *turn*))))
@@ -333,7 +338,7 @@
(defun go-board-quit ()
(interactive)
- (with-backends back (go-quit back))
+ (with-trackers tr (go-quit tr))
(kill-buffer (current-buffer)))
@@ -383,7 +388,7 @@
(with-board board
(apply-turn-to-board (list move))
(goto-char (point-of-pos (cddr move)))
- (mapcar (lambda (tr) (setf (go-move tr) move)) *trackers*)
+ (with-trackers tr (setf (go-move tr) move))
(setf *turn* (other-color *turn*))))
(defmethod go-labels ((board board))
- [elpa] 142/255: TODO igs probably needs to periodically ping the server, (continued)
- [elpa] 142/255: TODO igs probably needs to periodically ping the server, Eric Schulte, 2014/03/15
- [elpa] 143/255: pass move through board to *back-end*, Eric Schulte, 2014/03/15
- [elpa] 144/255: tests require igs, Eric Schulte, 2014/03/15
- [elpa] 146/255: print igs kibitz strings, Eric Schulte, 2014/03/15
- [elpa] 141/255: beginning of infrastructure for player names & info, Eric Schulte, 2014/03/15
- [elpa] 145/255: periodically ping IGS server to prevent disconnect, Eric Schulte, 2014/03/15
- [elpa] 147/255: igs implements the go back-end API, Eric Schulte, 2014/03/15
- [elpa] 148/255: improved the setf method for aget, Eric Schulte, 2014/03/15
- [elpa] 150/255: more lenient regexp for matching game listing, Eric Schulte, 2014/03/15
- [elpa] 152/255: Revert "improved the setf method for aget", Eric Schulte, 2014/03/15
- [elpa] 154/255: don't quit main back-end when quitting a board,
Eric Schulte <=
- [elpa] 158/255: beginning to translate svg images into elisp, Eric Schulte, 2014/03/15
- [elpa] 149/255: push all buffer-local variables into an igs object, Eric Schulte, 2014/03/15
- [elpa] 162/255: painting a nice svg board, but more to do, Eric Schulte, 2014/03/15
- [elpa] 159/255: translated all svg stone images into elisp, Eric Schulte, 2014/03/15
- [elpa] 164/255: prompt before quitting, Eric Schulte, 2014/03/15
- [elpa] 153/255: safety measure when observing igs games, Eric Schulte, 2014/03/15
- [elpa] 163/255: sorted out different types of backgrounds, Eric Schulte, 2014/03/15
- [elpa] 168/255: adding option to play a sound during moves, Eric Schulte, 2014/03/15
- [elpa] 155/255: less permissive igs move regular expression, Eric Schulte, 2014/03/15
- [elpa] 166/255: board images working with backgrounds, Eric Schulte, 2014/03/15