[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo a766f0c 282/357: [gnugo] Replace ‘gnugo-toggle-g
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo a766f0c 282/357: [gnugo] Replace ‘gnugo-toggle-grid’ w/ ‘gnugo-grid-mode’. |
Date: |
Sun, 29 Nov 2020 14:51:39 -0500 (EST) |
branch: externals/gnugo
commit a766f0c7a1c174dbec439bf41e38f868e69b7d11
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo] Replace ‘gnugo-toggle-grid’ w/ ‘gnugo-grid-mode’.
* packages/gnugo/gnugo.el (gnugo-grid-mode): New command.
(gnugo-toggle-grid): Delete command.
(gnugo-board-mode-map): Update binding for ‘g’.
---
NEWS | 1 +
gnugo.el | 19 +++++++++++--------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index 7153073..2db37f4 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ NB: "RCS: X..Y " means that the particular release includes
- now a normal var, and not a feature
- value can be a function to compute XPMs
- ‘gnugo-image-display-mode’ replaces ‘gnugo-toggle-image-display-command’
+ - ‘gnugo-grid-mode’ replaces ‘gnugo-toggle-grid’
- PASS for SZ <= 19 normalized to "" on read, written as ""
- ‘=’ also displays move number of the stone (if any) at that position
- ‘C-u F’ adds the (abbreviated) blurb as a comment to the last node
diff --git a/gnugo.el b/gnugo.el
index e95c91d..990ee48 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -567,14 +567,17 @@ when you are sure the command cannot fail."
'(1 . 1)))
(gnugo-put :display-using-images new)))
-(defun gnugo-toggle-grid ()
- "Turn the grid around the board on or off."
- (interactive)
- (funcall (if (memq :nogrid buffer-invisibility-spec)
- 'remove-from-invisibility-spec
- 'add-to-invisibility-spec)
+(define-minor-mode gnugo-grid-mode
+ "If enabled, display grid around the board."
+ :variable
+ ((not (memq :nogrid buffer-invisibility-spec))
+ .
+ (lambda (bool)
+ (funcall (if bool
+ 'remove-from-invisibility-spec
+ 'add-to-invisibility-spec)
:nogrid)
- (save-excursion (gnugo-refresh)))
+ (save-excursion (gnugo-refresh)))))
(defun gnugo-propertize-board-buffer ()
(erase-buffer)
@@ -2738,7 +2741,7 @@ See `gnugo-board-mode' for a full list of commands."
("W" . gnugo-worm-data)
("d" . gnugo-dragon-stones)
("D" . gnugo-dragon-data)
- ("g" . gnugo-toggle-grid)
+ ("g" . gnugo-grid-mode)
("!" . gnugo-estimate-score)
(":" . gnugo-command)
(";" . gnugo-command)
- [elpa] externals/gnugo 1fa7d59 204/357: [gnugo int] Add abstraction: gnugo--plant-and-climb, (continued)
- [elpa] externals/gnugo 1fa7d59 204/357: [gnugo int] Add abstraction: gnugo--plant-and-climb, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d96223f 209/357: [gnugo] Move most of ‘gnugo-board-mode’ to ‘gnugo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo eb77485 215/357: [gnugo int] Don't make ‘font-lock-defaults’ buffer-local., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 4d5f998 217/357: [gnugo int] Decruft: Drop unused local var., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e6c0a07 229/357: [gnugo int] Fix bug: On -l/--infile, don't set :last-mover., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 11543e5 232/357: [gnugo] Reduce modifier key bouncing for "quick peek" frolics., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo dae8f08 231/357: [gnugo] Fix bug: DTRT for :last-user-bpos in undo-one-move ME-NEXT., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f102d7f 240/357: [gnugo] Allow user to move for GNU Go., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9969838 260/357: [gnugo int] Drop abstractions: gnugo--{ERR-wait, gate-game-over}, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b9fa668 265/357: [gnugo int] Drop redundant ‘gnugo-gate’ calls., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a766f0c 282/357: [gnugo] Replace ‘gnugo-toggle-grid’ w/ ‘gnugo-grid-mode’.,
Stefan Monnier <=
- [elpa] externals/gnugo 4028102 271/357: [gnugo] Make climb-to-root "GNU Go to play" reaction customizable., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 46eec46 285/357: [gnugo int] Simplify COND expression., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo eaae57d 324/357: [gnugo int] Add Juanma Barranquero to THANKS; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo bb986d7 323/357: [gnugo] Release: 3.0.2, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 64bd753 327/357: [gnugo int] Simplify SGF-write subroutine., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c6eb3d1 325/357: [gnugo maint] Add people from ttn-pers-elisp THANKS file; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 981d75e 341/357: [gnugo] Fix bug: Don't clobber dead-group indication on refresh., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e4344ac 350/357: [gnugo] Release: 3.1.0, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo af82527 356/357: [gnugo] Release: 3.1.1, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 53da06f 329/357: [gnugo] Make ‘gnugo-comment’ fall back to root node., Stefan Monnier, 2020/11/29