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

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

[elpa] externals/gnugo ad774f4 074/357: [gnugo sgf] Move gratuitous newl


From: Stefan Monnier
Subject: [elpa] externals/gnugo ad774f4 074/357: [gnugo sgf] Move gratuitous newline from after to before (sub)trees.
Date: Sun, 29 Nov 2020 14:50:52 -0500 (EST)

branch: externals/gnugo
commit ad774f4806883800b8aaead99df7f9578d44b6e5
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo sgf] Move gratuitous newline from after to before (sub)trees.
    
    * packages/gnugo/gnugo.el (gnugo/sgf-write-file >>tree):
    At the start, insert a newline if not at bol;
    at the end, don't insert a newline.
    (gnugo/sgf-write-file): Insert a newline at EOF.
---
 gnugo.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnugo.el b/gnugo.el
index af71c59..ab59591 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -2219,6 +2219,8 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
                        for prop in node
                        do (>>prop prop)))
          (>>tree (tree)
+                 (unless (zerop (current-column))
+                   (newline))
                  (insert "(")
                  (dolist (node tree)
                    (>>node node))
@@ -2226,6 +2228,7 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
       (with-temp-buffer
         (dolist (tree collection)
           (>>tree tree))
+        (newline)
         (write-file filename)))))
 
 ;;; gnugo.el ends here



reply via email to

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