[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 57faa71 256/357: [gnugo] Don't display "Abdicatio
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 57faa71 256/357: [gnugo] Don't display "Abdication {en, dis}abled". |
Date: |
Sun, 29 Nov 2020 14:51:34 -0500 (EST) |
branch: externals/gnugo
commit 57faa71e8e1f51c3dd6a3759831f1ebaefd7aa7c
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo] Don't display "Abdication {en,dis}abled".
That tends to persist in the echo area, which is
both annoying and misleading should the game end.
* packages/gnugo/gnugo.el (gnugo--display-suggestion): New func.
(gnugo-get-move-insertion-filter): Use it.
(gnugo-toggle-abdication): Use ‘force-mode-line-update’;
don't ‘message’ state; however, retain "suggestion
forthcoming" message via ‘gnugo--display-suggestion’.
---
gnugo.el | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 67fec6b..b54ce2b 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1638,6 +1638,11 @@ its move."
(when (string-match old name)
(rename-buffer (replace-match new t t name))))))
+(defun gnugo--display-suggestion (color suggestion)
+ (message "%sSuggestion for %s: %s"
+ (gnugo-get :diamond)
+ color suggestion))
+
(defun gnugo-get-move-insertion-filter (proc string)
(with-current-buffer (process-buffer proc)
(let* ((so-far (gnugo-get :get-move-string))
@@ -1654,9 +1659,7 @@ its move."
(unless (or (gnugo--passp full)
(eq 'nowarp suggestion))
(gnugo-goto-pos full))
- (message "%sSuggestion for %s: %s"
- (gnugo-get :diamond)
- color full))
+ (gnugo--display-suggestion color full))
(let* ((donep (gnugo-push-move color full))
(buf (current-buffer)))
(gnugo--finish-move buf)
@@ -2319,15 +2322,9 @@ transformed into a move suggestion (see
`gnugo-request-suggestion')."
(gnugo-gate t)
(gnugo-put :abd t)
(gnugo-get-move (gnugo-other last-mover)))
- (message "Abdication %sabled%s"
- (if (gnugo-get :abd)
- "en"
- "dis")
- (if xform
- (format " (suggestion for %s forthcoming)"
- (gnugo-get :user-color))
- ""))
+ (force-mode-line-update) ; hmm
(when xform
+ (gnugo--display-suggestion (gnugo-get :user-color) "forthcoming")
(sleep-for 2))))
;;;---------------------------------------------------------------------------
- [elpa] externals/gnugo 67c82c1 309/357: Fix some quoting problems in doc strings, (continued)
- [elpa] externals/gnugo 67c82c1 309/357: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6bf46ba 290/357: [gnugo maint] Add ‘Maintainer’ header per top-level README; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7dbf4d7 305/357: [gnugo int] Use idiomatic ‘re-search-forward’ BOUND., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 289e336 310/357: [gnugo int] Use ‘setq-local’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo d4a4afd 289/357: [gnugo int] Add section "Tip Jar" in Commentary; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c09c26a 304/357: [gnugo int] Use "%F" and "%T"., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 53fe424 306/357: [gnugo maint] Update HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 21e1d9a 303/357: [gnugo int] Expose function to byte-compiler., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0469947 322/357: [gnugo slog] Prefer Cursor Intangible mode, if available., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 4930156 239/357: [gnugo int] Move ‘gnugo-position’ call down-chain., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 57faa71 256/357: [gnugo] Don't display "Abdication {en, dis}abled".,
Stefan Monnier <=
- [elpa] externals/gnugo 6edd793 252/357: [gnugo] Make undo commands silently handle overkill., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b0b18d0 254/357: [gnugo int] Decorate w/ plist instead of alist., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b07f602 248/357: [gnugo int] Move ‘gnugo--passp’ earlier in file., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5524a47 262/357: [gnugo int] Maintain current buffer in ‘gnugo--finish-move’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2b8d5aa 258/357: [gnugo int] Compute "Abd" in mode-line at time of change., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6a7af2a 274/357: [gnugo int] Decruft: Presume ‘display-images-p’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 35571e3 287/357: [gnugo int] Use private obarray for :all-yy elems, display props., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0473d72 264/357: [gnugo int] Comment munging; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5b49aad 316/357: [gnugo int] Use ‘line-end-position’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7544ffe 311/357: [gnugo maint] Add copyright policy to HACKING; nfc., Stefan Monnier, 2020/11/29