[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo b5f47cb 059/357: [gnugo int] Use ‘pcase’ more.
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo b5f47cb 059/357: [gnugo int] Use ‘pcase’ more. |
Date: |
Sun, 29 Nov 2020 14:50:48 -0500 (EST) |
branch: externals/gnugo
commit b5f47cb64ee3611fa4b2bc0405c510fe20256726
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Use ‘pcase’ more.
* gnugo.el (gnugo-move-history):
...here, instead of ‘if’ + ‘case’.
---
gnugo.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index e5f28d8..b578f24 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -650,14 +650,13 @@ For all other values of RSEL, do nothing and return nil."
(length acc)
(mapconcat 'identity (nreverse acc) " ")))
(finish (byp) (while (next byp)) (tell)))
- (if (equal '(4) rsel)
- (finish t)
- (case rsel
- ((nil) (finish nil))
- (car (car (next nil)))
- (cadr (next nil) (car (next nil)))
- (count (aref (gnugo-get :monkey) 2))
- (t nil))))))
+ (pcase rsel
+ (`(4) (finish t))
+ (`nil (finish nil))
+ (`car (car (next nil)))
+ (`cadr (next nil) (car (next nil)))
+ (`count (aref (gnugo-get :monkey) 2))
+ (_ nil)))))
(defun gnugo-boss-is-near ()
"Do `bury-buffer' until the current one is not a GNU Board."
- [elpa] externals/gnugo e64f1ae 170/357: [gnugo frolic] Add previous/next move navigation commands., (continued)
- [elpa] externals/gnugo e64f1ae 170/357: [gnugo frolic] Add previous/next move navigation commands., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c78119f 191/357: [gnugo int] Add abstraction: gnugo--finish-move, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a3d90aa 189/357: [gnugo maint] Update HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5dcf9f6 185/357: [gnugo int] Add abstraction: gnugo--node-with-played-stone, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1367651 173/357: [gnugo int] Make ‘gnugo-gate’ slightly faster., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a4c246e 188/357: [gnugo frolic] Display "!" for comment; add as ‘help-echo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8203f46 194/357: [gnugo int] Centralize some constant strings., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b1f2856 183/357: [gnugo] Fix bug: Keep subproc informed of forced PASS., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3112192 056/357: [gnugo int] Streamline subproc (de-)marshalling., Stefan Monnier, 2020/11/29
- [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 <=
- [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, 2020/11/29
- [elpa] externals/gnugo a86a897 013/357: [gnugo int] Use ‘redisplay’ more., Stefan Monnier, 2020/11/29