[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnugo 45fe672 169/357: [gnugo int] Move :SZ access int

From: Stefan Monnier
Subject: [elpa] externals/gnugo 45fe672 169/357: [gnugo int] Move :SZ access into ‘gnugo--as-pos-func’.
Date: Sun, 29 Nov 2020 14:51:14 -0500 (EST)

branch: externals/gnugo
commit 45fe6727e80eaf3f8dd0b43efcad61c255d4e31b
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo int] Move :SZ access into ‘gnugo--as-pos-func’.
    * packages/gnugo/gnugo.el (gnugo--as-pos-func):
    Don't take arg ‘size’; instead, do ‘(gnugo-get :SZ)’ internally.
    (gnugo-move-history): Update call to ‘gnugo--as-pos-func’.
    (gnugo-frolic-in-the-leaves): Likewise.
 gnugo.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 93ed2f3..d1e811d 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -662,8 +662,8 @@ when you are sure the command cannot fail."
   (or (assq :B node)
       (assq :W node)))
-(defun gnugo--as-pos-func (size)
-  (lexical-let ((size size))
+(defun gnugo--as-pos-func ()
+  (lexical-let ((size (gnugo-get :SZ)))
     ;; rv
     (lambda (cc)
       (if (string= "" cc)
@@ -688,7 +688,7 @@ For all other values of RSEL, do nothing and return nil."
   (interactive "P")
   (let* ((monkey (gnugo-get :monkey))
          (mem (aref monkey 0))
-         (as-pos (gnugo--as-pos-func (gnugo-get :SZ)))
+         (as-pos (gnugo--as-pos-func))
          acc node mprop move)
         ((as-pos-maybe (x) (if (string= "resign" x)
@@ -785,7 +785,7 @@ are dimmed.  Type \\[describe-mode] in that buffer for 
          (width (length ends))
          (lanes (number-sequence 0 (1- width)))
          (monkey (gnugo-get :monkey))
-         (as-pos (gnugo--as-pos-func (gnugo-get :SZ)))
+         (as-pos (gnugo--as-pos-func))
          (at (car (aref monkey 0)))
          (bidx (aref monkey 1))
          (valid (map 'vector (lambda (end)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]