[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 5ca5b0a 097/357: [gnugo int] Add abstraction: gnu
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 5ca5b0a 097/357: [gnugo int] Add abstraction: gnugo--nodep |
Date: |
Sun, 29 Nov 2020 14:50:57 -0500 (EST) |
branch: externals/gnugo
commit 5ca5b0a29492ba4ea6293b54a91b35e9a4cc8a10
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Add abstraction: gnugo--nodep
* packages/gnugo/gnugo.el (gnugo--nodep): New defsubst.
(gnugo-read-sgf-file, gnugo/sgf-write-file): Use it.
---
gnugo.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 053d8aa..4ff6621 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1293,6 +1293,9 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
"as before"
"NOTE: this is a switch!")))
+(defsubst gnugo--nodep (x)
+ (keywordp (caar x)))
+
(defsubst gnugo--SZ! (size)
(gnugo-put :SZ size))
@@ -1342,7 +1345,7 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
(while (setq node (car loc))
;; A gametree must have at least one node prior to the first
;; sub-gametree (if any), so we need check the CAR only once.
- (unless (symbolp (caar node))
+ (unless (gnugo--nodep node)
(setq loc node
node (car loc)))
(when (setq play (or (assq :B node)
@@ -2250,7 +2253,7 @@ starting a new one. See `gnugo-board-mode' documentation
for more info."
;; requires this somewhat-funky border search.
(let (x subtrees)
(while (setq x (pop tree))
- (if (symbolp (caar x))
+ (if (gnugo--nodep x)
(>>node x)
(setq
;; Add back the first subtree.
- [elpa] externals/gnugo 294bdc1 047/357: [gnugo maint] Update NEWS; nfc., (continued)
- [elpa] externals/gnugo 294bdc1 047/357: [gnugo maint] Update NEWS; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b5f47cb 059/357: [gnugo int] Use ‘pcase’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8cabdfa 042/357: [gnugo int] Use internal macros more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b484515 064/357: [gnugo int] Use ‘loop’, functional style more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a7dffa0 067/357: [gnugo maint] Update NEWS; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d2b4549 068/357: [gnugo] Bind ‘M-u’ to ‘gnugo-undo-one-move’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f82c526 078/357: [gnugo int] Use ‘following-char’ instead of ‘char-after’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f29b22f 081/357: [gnugo int] Use ‘setq’ less., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 38137d3 079/357: [gnugo int] Cache gametree prop ‘:SZ’ as gnugo prop ‘:SZ’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d6f3956 089/357: [gnugo int] Decruft: Infer MOVEP from PROPERTY., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5ca5b0a 097/357: [gnugo int] Add abstraction: gnugo--nodep,
Stefan Monnier <=
- [elpa] externals/gnugo a86a897 013/357: [gnugo int] Use ‘redisplay’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3063f95 041/357: [gnugo] Make proc-status change mode-line elem more informative., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c2f7717 053/357: [gnugo slog] Fix bug: Avoid ‘cl-lib’ funcs; use only macros., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 02926a1 049/357: [gnugo] Rename var to ‘gnugo-inhibit-refresh’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5e4b5a8 051/357: [gnugo] Release: 2.3.0, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 400e27d 069/357: [gnugo int] Add abstraction: gnugo--who-is-who, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3547cbe 080/357: [gnugo int] Add abstraction: gnugo--set-root-prop, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 11e545d 082/357: [gnugo int] Use ‘loop’ instead of ‘dolist’ + ‘destructuring-bind’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5eeb99b 087/357: [gnugo int] Use ‘incf’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7293802 088/357: [gnugo int] Use ‘setq’ less., Stefan Monnier, 2020/11/29