[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 17/51: [gnugo] Indicate buffer not modified after save.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 17/51: [gnugo] Indicate buffer not modified after save. |
Date: |
Mon, 24 Feb 2014 12:30:19 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit dc89a3ce43357ef755a295c05b0b3bce63c65c8c
Author: Thien-Thi Nguyen <address@hidden>
Date: Mon Feb 3 10:36:46 2014 +0100
[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.
---
packages/gnugo/gnugo.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 17cb428..f69078b 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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] 12/51: [gnugo doc] Document version-number scheme., (continued)
- [elpa] 12/51: [gnugo doc] Document version-number scheme., Thien-Thi Nguyen, 2014/02/24
- [elpa] 04/51: [gnugo maint] Add NEWS file; prune Commentary; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 13/51: [gnugo int] Use ‘redis play’ more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 05/51: [gnugo] Use ‘cl-labels ’ instead of ‘flet’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 11/51: [gnugo maint] Add HACKING; prune Commentary; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 09/51: [gnugo] Wait at most 30sec for subproc output chunk., Thien-Thi Nguyen, 2014/02/24
- [elpa] 16/51: [gnugo maint] Update "next" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 07/51: [gnugo] Presume "modern" GNU Emacs., Thien-Thi Nguyen, 2014/02/24
- [elpa] 06/51: [gnugo] Presume working time-date.el., Thien-Thi Nguyen, 2014/02/24
- [elpa] 19/51: [gnugo maint] Revamp "ChangeLog discipline" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 17/51: [gnugo] Indicate buffer not modified after save.,
Thien-Thi Nguyen <=
- [elpa] 20/51: [gnugo int] Avoid variable FO RMAT for ‘message’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 14/51: [gnugo int] Use ‘displ ay’ property more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 15/51: [gnugo int] Use ‘(spli t-string STR SEP t)’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 23/51: [gnugo int] Drop unused local var., Thien-Thi Nguyen, 2014/02/24
- [elpa] 24/51: [gnugo int] Use ‘numbe r-sequence’ more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 18/51: [gnugo maint] Update a musing item in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 25/51: [gnugo int] Use cl-{plus,minus}p more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 27/51: [gnugo int] Hang the sync-return-stash on the process object., Thien-Thi Nguyen, 2014/02/24
- [elpa] 22/51: [gnugo maint] Add .dir-locals.el file, link in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 29/51: [gnugo] Indicate buffer not modified after load., Thien-Thi Nguyen, 2014/02/24