[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 106a279 211/357: [gnugo int] Consolidate paren ov
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 106a279 211/357: [gnugo int] Consolidate paren overlays access. |
Date: |
Sun, 29 Nov 2020 14:51:23 -0500 (EST) |
branch: externals/gnugo
commit 106a2795cb302c8175d352f6136c9e08be744307
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Consolidate paren overlays access.
* packages/gnugo/gnugo.el (gnugo-put): Update docstring.
(gnugo-refresh): Use ‘destructuring-bind’ for paren overlays.
(gnugo): Don't ‘gnugo-put’ overlays in :lparen-ov and
:rparen-ov; instead, cons them and stash the pair in :paren-ov.
---
gnugo.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 1d5d2b3..e20bd84 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -243,8 +243,8 @@ you may never really understand to any degree of personal
satisfaction\".
46 = 9 places * (4 moku + 1 empty) + 1 hoshi; see functions
`gnugo-toggle-image-display', `gnugo-yy' and `gnugo-yang'
- :lparen-ov -- overlays shuffled about to indicate the last move; only
- :rparen-ov one is used when displaying using images
+ :paren-ov -- a pair (left and right) of overlays shuffled about to indicate
+ the last move; only one is used when displaying using images
:last-user-bpos -- board position; keep the hapless human happy
@@ -1414,8 +1414,7 @@ its move."
window last)
;; last move
(when move
- (let ((l-ov (gnugo-get :lparen-ov))
- (r-ov (gnugo-get :rparen-ov)))
+ (destructuring-bind (l-ov . r-ov) (gnugo-get :paren-ov)
(if (member move '("PASS" "resign"))
(mapc 'delete-overlay (list l-ov r-ov))
(gnugo-goto-pos move)
@@ -2500,10 +2499,10 @@ starting a new one. See `gnugo-board-mode'
documentation for more info."
(gnugo-put :gnugo-color (gnugo-other user-color))
(gnugo-put :highlight-last-move-spec
(gnugo-put :default-highlight-last-move-spec '("(" -1 nil)))
- (gnugo-put :lparen-ov (make-overlay 1 1))
- (gnugo-put :rparen-ov (let ((ov (make-overlay 1 1)))
- (overlay-put ov 'display ")")
- ov))
+ (gnugo-put :paren-ov (cons (make-overlay 1 1)
+ (let ((ov (make-overlay 1 1)))
+ (overlay-put ov 'display ")")
+ ov)))
(gnugo--plant-and-climb
(gnugo/sgf-create "(;FF[4]GM[1])" t))
(gnugo--SZ! board-size)
- [elpa] externals/gnugo cba406b 176/357: [gnugo] Include root node in :sgf-gametree description., (continued)
- [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
- [elpa] externals/gnugo 5bbec0e 179/357: [gnugo int] Incorporate ‘gnugo-note’ into unique caller., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 82b6000 198/357: [gnugo] Mention ‘gnugo-frolic-mode-hook’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 32e8547 199/357: [gnugo int] Add abstraction: gnugo--user-play, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 001228c 205/357: [gnugo] Drop support for ‘(gnugo-move-history 'count)’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 106a279 211/357: [gnugo int] Consolidate paren overlays access.,
Stefan Monnier <=
- [elpa] externals/gnugo 17d907d 210/357: [gnugo int] Shave one ‘gnugo-other’ call., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1d6b241 214/357: [gnugo] Use ‘define-derived-mode’ for GNUGO Board mode., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 167ba89 213/357: [gnugo int] Decruft: Streamline game-over handling on SGF load., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b3d3da0 220/357: [gnugo int] Use functional style more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e96b88b 218/357: [gnugo] Decruft: Use ‘gnugo-program’ directly as executable., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3670b0b 228/357: [gnugo] On SGF load, leave cursor at last user board position., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1020a7f 237/357: [gnugo int] Simplify towards-root loop termination check., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7114ed6 234/357: [gnugo int] Add abstraction: gnugo--mem-with-played-stone, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9ae1363 236/357: [gnugo] Internalize ‘gnugo-magic-undo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a92e184 255/357: fixup! [gnugo int] Decorate w/ plist instead of alist., Stefan Monnier, 2020/11/29