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

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

[elpa] 202/255: added interface function to view an SGF file


From: Eric Schulte
Subject: [elpa] 202/255: added interface function to view an SGF file
Date: Sun, 16 Mar 2014 01:02:48 +0000

eschulte pushed a commit to branch go
in repository elpa.

commit ff15acfccafd868cff835b179d1b5d2ae72b131b
Author: Eric Schulte <address@hidden>
Date:   Tue May 21 10:08:44 2013 -0600

    added interface function to view an SGF file
---
 go.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/go.el b/go.el
index 974f2b6..c63757c 100644
--- a/go.el
+++ b/go.el
@@ -71,4 +71,12 @@
       (unless (equal (class-of back-end) 'sgf)
         (setq *autoplay* t)))))
 
+(defun view-sgf (&optional file)
+  "View an SGF file."
+  (interactive "fSGF file: ")
+  (let* ((sgf (make-instance 'sgf :self (sgf2el-file-to-el file) :index '(0)))
+         (buffer (go-board sgf)))
+    (with-current-buffer buffer
+      (setf (index *back-end*) (list 0)))))
+
 (provide 'go)



reply via email to

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