[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 08b2a66 017/357: [gnugo] Indicate buffer not modi
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 08b2a66 017/357: [gnugo] Indicate buffer not modified after save. |
Date: |
Sun, 29 Nov 2020 14:50:38 -0500 (EST) |
branch: externals/gnugo
commit 08b2a6664ad5b7d4b0dad02a8d7ad819d6c80f56
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo] Indicate buffer not modified after save.
* packages/gnugo/gnugo.el (gnugo-animate-group): Use current
value of ‘buffer-modified-p’ in loop instead of ‘t’.
(gnugo-write-sgf-file): Clear buffer-modified state.
---
gnugo.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 17cb428..f69078b 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1045,6 +1045,7 @@ To start a game try M-x gnugo."
(defun gnugo-animate-group (command)
(message "Computing %s ..." command)
(let* ((pos (gnugo-position))
+ (orig-b-m-p (buffer-modified-p))
(stones (if (memq (char-after) '(?X ?O))
(gnugo-lsquery "%s %s" command pos)
(error "No stone at %s" pos))))
@@ -1076,7 +1077,8 @@ To start a game try M-x gnugo."
(while (and (cdr spec) ; let last linger lest levity lost
(sit-for 0.08675309)) ; jenny jenny i got your number...
(setcar cell (setq spec (cdr spec)))
- (set-buffer-modified-p t))
+ ;; Force redisplay of overlays.
+ (set-buffer-modified-p orig-b-m-p))
(sit-for 5)
(mapc 'delete-overlay ovs)
t)))
@@ -1199,7 +1201,8 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
(when (and (file-exists-p filename)
(not (y-or-n-p "File exists. Continue? ")))
(error "Not writing %s" filename))
- (gnugo/sgf-write-file (gnugo-get :sgf-collection) filename))
+ (gnugo/sgf-write-file (gnugo-get :sgf-collection) filename)
+ (set-buffer-modified-p nil))
(defun gnugo-read-sgf-file (filename)
"Load the first game tree from FILENAME, a file in SGF format."
- [elpa] externals/gnugo 9ec0f3e 007/357: [gnugo] Presume "modern" GNU Emacs., (continued)
- [elpa] externals/gnugo 9ec0f3e 007/357: [gnugo] Presume "modern" GNU Emacs., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0893d87 010/357: [gnugo] Don't use ‘process-kill-buffer-query-function’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7484ea0 011/357: [gnugo maint] Add HACKING; prune Commentary; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5b0f262 012/357: [gnugo doc] Document version-number scheme., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo fee8b33 015/357: [gnugo int] Use ‘(split-string STR SEP t)’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7f961b7 016/357: [gnugo maint] Update "next" in HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f84b823 018/357: [gnugo maint] Update a musing item in HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 0838a13 021/357: [gnugo gtp int] Use :post-thunk instead of :post-hook., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo e16a8d5 031/357: [gnugo int] Add abstraction: gnugo--unclose-game, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 28da1b4 035/357: [gnugo int] Use ‘dolist’ and ‘destructuring-bind’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 08b2a66 017/357: [gnugo] Indicate buffer not modified after save.,
Stefan Monnier <=
- [elpa] externals/gnugo 9893ff1 027/357: [gnugo int] Hang the sync-return-stash on the process object., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b8b8763 037/357: [gnugo maint] Update "next" in HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a4b96a1 024/357: [gnugo int] Use ‘number-sequence’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 402bf68 039/357: [gnugo] Don't show underscore in group-animation message., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7647c9c 062/357: [gnugo int] Avoid redundant calls to ‘gnugo-get’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo fef1847 040/357: [gnugo] Use special constructs for keybindings in docstrings., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5c8f31d 043/357: [gnugo maint] Update HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2d4c9ad 046/357: [gnugo] New command: ‘_’ and ‘M-_’ (gnugo-boss-is-near), Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 02c55b7 054/357: [gnugo] Release: 2.3.1, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c479509 044/357: [gnugo] Bind ‘DEL’ to ‘gnugo-undo-two-moves’., Stefan Monnier, 2020/11/29