[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 3e3fbea 155/357: [gnugo sgf] Fix bug: Preserve w
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 3e3fbea 155/357: [gnugo sgf] Fix bug: Preserve whitespace for ‘text’ values. |
Date: |
Sun, 29 Nov 2020 14:51:11 -0500 (EST) |
branch: externals/gnugo
commit 3e3fbea27cdfdb6b43862e1a193fc71d05906472
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo sgf] Fix bug: Preserve whitespace for ‘text’ values.
* packages/gnugo/gnugo.el (gnugo/sgf-create x):
Take arg PRESERVE-WHITESPACE; when set, don't squeeze whitespace.
(gnugo/sgf-create one): Specify PRESERVE-WHITESPACE
to ‘x’ when ‘type’ is ‘text’.
---
NEWS | 1 +
gnugo.el | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index e813c77..8bd3b75 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ NB: "RCS: X..Y " means that the particular release includes
- next | NOT YET RELEASED
- bugfixes
+ - preserve whitespace for value type ‘text’
- don't special-case property value type ‘none’
- handle subtrees on write
- display "resign" as "resign" in move history (amazing!)
diff --git a/gnugo.el b/gnugo.el
index 7c28831..66af605 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -2595,7 +2595,7 @@ A collection is a list of gametrees, each a vector of
four elements:
SZ)
(cl-labels
((sw () (skip-chars-forward " \t\n"))
- (x (end)
+ (x (end preserve-whitespace)
(let ((beg (point))
(endp (case end
(:end (lambda (char) (= ?\] char)))
@@ -2609,14 +2609,15 @@ A collection is a list of gametrees, each a vector of
four elements:
(if (eolp)
(kill-line 1)
(forward-char 1)))
- ((looking-at "\\s-+")
+ ((unless preserve-whitespace
+ (looking-at "\\s-+"))
(delete-region (point) (match-end 0))
(insert " "))
(t (forward-char 1))))
(buffer-substring-no-properties beg (point))))
(one (type end) (let ((s (progn
(forward-char 1)
- (x end))))
+ (x end (eq 'text type)))))
(case type
((stone point move)
;; blech, begone bu"tt"-ugly blatherings
- [elpa] externals/gnugo fda0ca5 130/357: [gnugo int] Move precise fanout computation to "breathe in"., (continued)
- [elpa] externals/gnugo fda0ca5 130/357: [gnugo int] Move precise fanout computation to "breathe in"., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo cbf99df 131/357: [gnugo int] Insert frolic xrep starting w/ the leaves., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5c87b11 141/357: [gnugo frolic int] Use ‘move-to-column’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d62412f 144/357: [gnugo int] Add abstraction: gnugo--move-to-bcol, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 4680536 143/357: [gnugo int] Fix bug: Unbreak SGF file output., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 806a2f2 133/357: [gnugo] Add some navigation commands for GNUGO Frolic mode., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c6795aa 140/357: [gnugo frolic int] Assign ‘pop’ rv to avoid byte-compiler warning., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 13c8f82 149/357: [gnugo frolic] Doc fix., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo de40b22 152/357: [gnugo int] Move vectorization into ‘gnugo--set-tree-ends’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e8833a9 161/357: [gnugo int] Fix syntax error in ‘loop’ destructuring., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3e3fbea 155/357: [gnugo sgf] Fix bug: Preserve whitespace for ‘text’ values.,
Stefan Monnier <=
- [elpa] externals/gnugo 0f3f4b6 165/357: [gnugo int] Use ‘ignore’ to avoid byte-compiler warnings., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 082d56c 178/357: [gnugo int] Use ‘gnugo--decorate’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e382633 190/357: [gnugo] Drop var: gnugo-inhibit-refresh, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo dd6b6f8 186/357: [gnugo] New command: ‘C’ (gnugo-comment), Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo cba406b 176/357: [gnugo] Include root node in :sgf-gametree description., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1ac646f 172/357: [gnugo] New command: ‘O’ (gnugo-okay), Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3f13bbf 168/357: [gnugo] Make ‘=’ also display move number., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f3c90cd 187/357: [gnugo] Make ‘C-u F’ add the blurb as a comment to the last node., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo bcc912b 164/357: [gnugo frolic int] Add var selection to awakening parameterization., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 66c29d0 197/357: [gnugo int] Add abstraction: gnugo--gate-game-over, Stefan Monnier, 2020/11/29