[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/05: [gnugo int] Drop abstraction: pretty
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/05: [gnugo int] Drop abstraction: pretty |
Date: |
Thu, 24 Apr 2014 18:02:18 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 00c929690be1b6839a3f44909f4a8b6f7f104757
Author: Thien-Thi Nguyen <address@hidden>
Date: Thu Apr 24 11:42:06 2014 +0200
[gnugo int] Drop abstraction: pretty
* packages/gnugo/gnugo.el (gnugo-move-history pretty):
Delete internal func.
(gnugo-move-history next): Revert to pre-‘pretty’ code.
(gnugo-move-history): For ‘bpos’ RSEL, convert search
condition from two negated string comparisons to one
"normal CC" position detection, and delay ‘as-pos’
call to rv computation.
---
packages/gnugo/gnugo.el | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index ac0d79b..f0c9dda 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -742,9 +742,8 @@ For all other values of RSEL, do nothing and return nil."
(funcall as-pos x)))
(remem () (setq node (pop mem)
mprop (gnugo--move-prop node)))
- (pretty () (setq move (as-pos-maybe (cdr mprop))))
(next (byp) (when (remem)
- (pretty)
+ (setq move (as-pos-maybe (cdr mprop)))
(push (if byp
(format "%s%s" move (car mprop))
move)
@@ -761,12 +760,13 @@ For all other values of RSEL, do nothing and return nil."
(`cadr (nn) (car (nn)))
(`two (nn) (nn) acc)
(`bpos (loop with prop = (gnugo--prop<-color color)
+ while mem
when (and (remem)
(eq prop (car mprop))
- (pretty)
- (not (string= "resign" move))
- (not (gnugo--passp move)))
- return move))
+ (setq move (cdr mprop))
+ ;; i.e., "normal CC" position
+ (= 2 (length move)))
+ return (funcall as-pos move)))
(_ nil)))))
(define-derived-mode gnugo-frolic-mode special-mode "GNUGO Frolic"