[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/02: [gnugo int] Move :SZ access into ‘gnugo--as-pos-func’.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/02: [gnugo int] Move :SZ access into ‘gnugo--as-pos-func’. |
Date: |
Sat, 12 Apr 2014 15:43:15 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit c2d22d59e0d8aa9386c26961c2bd100046486bee
Author: Thien-Thi Nguyen <address@hidden>
Date: Sat Apr 12 12:35:29 2014 +0200
[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.
---
packages/gnugo/gnugo.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 93ed2f3..d1e811d 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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)
(cl-flet*
((as-pos-maybe (x) (if (string= "resign" x)
@@ -785,7 +785,7 @@ are dimmed. Type \\[describe-mode] in that buffer for
details."
(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)