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

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

[elpa] 02/02: [gnugo] Fix bug: Handle pro perty value type ‘none’ normal


From: Thien-Thi Nguyen
Subject: [elpa] 02/02: [gnugo] Fix bug: Handle pro perty value type ‘none’ normally.
Date: Thu, 13 Mar 2014 16:07:30 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 14a32bfabab802d50564848c829d34271c3baee6
Author: Thien-Thi Nguyen <address@hidden>
Date:   Thu Mar 13 17:09:17 2014 +0100

    [gnugo] Fix bug: Handle property value type ‘none’ normally.
    
    * packages/gnugo/gnugo.el (gnugo/sgf-read-file one):
    No longer special case property value type ‘none’;
    instead, read the supplied value and discard it,
    saving instead a hardcoded empty string, i.e., "".
---
 packages/gnugo/NEWS     |    2 ++
 packages/gnugo/gnugo.el |   17 +++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/packages/gnugo/NEWS b/packages/gnugo/NEWS
index 5f33ce3..fbfec3b 100644
--- a/packages/gnugo/NEWS
+++ b/packages/gnugo/NEWS
@@ -9,6 +9,8 @@ Hint: (highlight-phrase 
"[0-9][.][0-9][.][0-9]+\\|[0-9]+[.][.][0-9]+"
 
 
 - next | NOT YET RELEASED
+  - bugfixes
+    - don't special-case property value type ‘none’
   - new keybinding for ‘gnugo-undo-one-move’: M-u
   - ‘gnugo-undo-one-move’ can optionally switch colors
   - performance improvements
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index ded615e..7b8b829 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -2087,14 +2087,15 @@ starting a new one.  See `gnugo-board-mode' 
documentation for more info."
                              (insert " "))
                             (t (forward-char 1))))
                     (buffer-substring-no-properties beg (point))))
-         (one (type end) (unless (eq 'none type)
-                           (forward-char 1)
-                           (let ((s (x end)))
-                             (case type
-                               ((stone point move simpletext color) s)
-                               ((number real double) (string-to-number s))
-                               ((text) s)
-                               (t (error "Unhandled type: %S" type))))))
+         (one (type end) (let ((s (progn
+                                    (forward-char 1)
+                                    (x end))))
+                           (case type
+                             ((stone point move simpletext color) s)
+                             ((number real double) (string-to-number s))
+                             ((text) s)
+                             ((none) "")
+                             (t (error "Unhandled type: %S" type)))))
          (val (spec) (cond ((symbolp spec)
                             (one spec :end))
                            ((vectorp spec)



reply via email to

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