[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 53da06f 329/357: [gnugo] Make ‘gnugo-comment’ fa
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 53da06f 329/357: [gnugo] Make ‘gnugo-comment’ fall back to root node. |
Date: |
Sun, 29 Nov 2020 14:51:50 -0500 (EST) |
branch: externals/gnugo
commit 53da06fb0e7a8225c48756fb7f7ba1f99b9a0801
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo] Make ‘gnugo-comment’ fall back to root node.
* packages/gnugo/gnugo.el (gnugo-comment): Interactively,
no longer signal ‘user-error’ if there is no played
stone at point; instead, take NODE to be the root node.
---
gnugo.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 3bfee65..9dd0b61 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -2015,17 +2015,20 @@ If there a stone at that position, also display its
move number."
(defun gnugo-comment (node comment)
"Add to NODE a COMMENT (string) property.
-Called interactively, NODE is the one corresponding to the
-stone at point, and any previous comment is inserted as the
-initial-input (see `read-string').
+Interactively, NODE is the one corresponding to the stone at point,
+or the root node if there is no played stone at point, and any
+previous comment is inserted as the initial-input (see `read-string').
If COMMENT is nil or the empty string, remove the property entirely."
(interactive
(let* ((pos (gnugo-position))
- (node (gnugo--node-with-played-stone pos)))
+ (node (or (gnugo--node-with-played-stone pos t)
+ (gnugo--root-node))))
(list node
(read-string (format "Comment for %s: "
- (gnugo-describe-position))
+ (if (eq node (gnugo--root-node))
+ "root node"
+ (gnugo-describe-position)))
(cdr (assq :C node))))))
(setq node (delq (assq :C node) node))
(unless (zerop (length comment))
- [elpa] externals/gnugo a766f0c 282/357: [gnugo] Replace ‘gnugo-toggle-grid’ w/ ‘gnugo-grid-mode’., (continued)
- [elpa] externals/gnugo a766f0c 282/357: [gnugo] Replace ‘gnugo-toggle-grid’ w/ ‘gnugo-grid-mode’., Stefan Monnier, 2020/11/29
- [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 <=
- [elpa] externals/gnugo 781a385 332/357: [gnugo] Drop trailing fullstop for "... done" messages., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c5ef13d 334/357: [gnugo] Make ‘gnugo-goto-pos’ return buffer position., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6170d2a 333/357: [gnugo] Make ‘C-c C-p’ output more spacious., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0320a5c 335/357: [gnugo int] Decruft: Don't bother w/ ‘group’ text property., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8123275 338/357: [gnugo] Drop trailing fullstop in animation message., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 08f11af 339/357: [gnugo int] Incorporate ‘gnugo-toggle-image-display’ into unique caller., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 1e01c65 340/357: [gnugo] When sorry, say "Sorry" first., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3541ccf 343/357: [gnugo int] Lift redundant pall of death computation., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 38b2529 124/357: [gnugo int] Add abstraction: gnugo--mkht, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0f9f540 125/357: [gnugo int] Maintain tree MNUM., Stefan Monnier, 2020/11/29