emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 02/04: [gnugo int] Add abstraction: gnugo--decorate


From: Thien-Thi Nguyen
Subject: [elpa] 02/04: [gnugo int] Add abstraction: gnugo--decorate
Date: Mon, 14 Apr 2014 06:57:43 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 401aebcd912112f5776310bd58e73924ec9f9ffc
Author: Thien-Thi Nguyen <address@hidden>
Date:   Sun Apr 13 13:42:55 2014 +0200

    [gnugo int] Add abstraction: gnugo--decorate
    
    * packages/gnugo/gnugo.el (gnugo--decorate): New defsubst.
    (gnugo-note): Use ‘gnugo--decorate’.
---
 packages/gnugo/gnugo.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index ced9868..cb122ef 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1174,6 +1174,10 @@ This fails if the monkey is on the current branch
                                  (substring pos 1))))))
         (format "%c%c" one two)))))
 
+(defsubst gnugo--decorate (node alist)
+  ;; NB: ALIST should not have :B or :W keys.
+  (setcdr (last node) alist))
+
 (defun gnugo-note (property value &optional mogrifyp)
   (when mogrifyp
     (let ((as-cc (gnugo--as-cc-func)))
@@ -1252,7 +1256,7 @@ This fails if the monkey is on the current branch
              (push fruit mem)
              (aset ends bidx mem)))
           (setf (aref monkey 0) mem))
-      (setcdr (last tip) fruit))))
+      (gnugo--decorate tip fruit))))
 
 (defun gnugo-close-game (end-time resign)
   (gnugo-put :game-end-time end-time)



reply via email to

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