ttn pushed a commit to branch master in repository elpa. commit 5ce5aabddbd5189b7e45aa475c1f198e67999eaf Author: Thien-Thi Nguyen <t...@gnu.org> Date: Tue Apr 22 11:45:50 2014 +0200
[gnugo int] Use ‘destructuring-bind’ more. * packages/gnugo/gnugo.el (gnugo-gate): ...here, for :waiting check, in the process making it player-agnostic. --- packages/gnugo/gnugo.el | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el index ae962fc..7240755 100644 --- a/packages/gnugo/gnugo.el +++ b/packages/gnugo/gnugo.el @@ -360,12 +360,13 @@ Handle the big, slow-to-render, and/or uninteresting ones specially." (user-error "Wrong buffer -- try M-x gnugo")) (unless (gnugo-get :proc) (user-error "No \"gnugo\" process!")) - (let ((slow (gnugo-get :waiting))) - (when slow - (gnugo--ERR-wait (gnugo-get :user-color) - (if (cdr slow) - "Still thinking" - "Not your turn yet")))) + (destructuring-bind (&optional color . suggestion) + (gnugo-get :waiting) + (when color + (gnugo--ERR-wait + color (if suggestion + "Still thinking" + "Not your turn yet")))) (gnugo--gate-game-over in-progress-p)) (defun gnugo-sentinel (proc string)