[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 02/04: [gnugo] Drop var: gnugo-inhibit-refresh
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 02/04: [gnugo] Drop var: gnugo-inhibit-refresh |
Date: |
Tue, 15 Apr 2014 08:53:22 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 671a5abc1ffdc5b9a70eb41fd00fe4bc550e9fba
Author: Thien-Thi Nguyen <address@hidden>
Date: Tue Apr 15 07:44:04 2014 +0200
[gnugo] Drop var: gnugo-inhibit-refresh
* packages/gnugo/gnugo.el (gnugo-inhibit-refresh): Delete.
(gnugo-post-move-hook): Update docstring.
(gnugo-get-move-insertion-filter)
(gnugo-move, gnugo-pass): Update.
---
packages/gnugo/NEWS | 1 +
packages/gnugo/gnugo.el | 28 ++++++++--------------------
2 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/packages/gnugo/NEWS b/packages/gnugo/NEWS
index 1b7ab98..a6be4b8 100644
--- a/packages/gnugo/NEWS
+++ b/packages/gnugo/NEWS
@@ -29,6 +29,7 @@ NB: "RCS: X..Y " means that the particular release includes
- ‘gnugo-move-history’ returns last two moves w/ RSEL ‘two’
- performance improvements
- of interest to hackers (see source, BI => backward incompatible)
+ - dropped var: ‘gnugo-inhibit-refresh’ (BI)
- ‘gnugo/sgf-read-file’ renamed to ‘gnugo/sgf-create’ and enhanced
- ‘:sgf-gametree’ internal representation inverted (BI)
- ‘gnugo-magic-undo’ handles SPEC ‘0’
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 84620aa..4991040 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -108,13 +108,8 @@ http://www.gnu.org/software/gnugo")
(defvar gnugo-board-mode-hook nil
"Hook run when entering GNUGO Board mode.")
-(defvar gnugo-inhibit-refresh nil
- "Used in `gnugo-post-move-hook'.")
-
(defvar gnugo-post-move-hook nil
"Normal hook run after a move and before the board is refreshed.
-Hook functions can prevent the call to `gnugo-refresh' by evaluating:
- (setq gnugo-inhibit-refresh t)
Initially, when `run-hooks' is called, the current buffer is the GNUGO
Board buffer of the game. Hook functions that switch buffers must take
care not to call (directly or indirectly through some other function)
@@ -1566,11 +1561,9 @@ its move."
(gnugo-push-move (string= color (gnugo-get :user-color))
pos-or-pass)
(let ((buf (current-buffer)))
- (let (gnugo-inhibit-refresh)
- (run-hooks 'gnugo-post-move-hook)
- (unless gnugo-inhibit-refresh
- (with-current-buffer buf
- (gnugo-refresh))))))))))
+ (run-hooks 'gnugo-post-move-hook)
+ (with-current-buffer buf
+ (gnugo-refresh))))))))
(defun gnugo-get-move (color)
(gnugo-put :waiting color)
@@ -1615,12 +1608,9 @@ To start a game try M-x gnugo."
(let* ((buf (current-buffer))
(pos (gnugo-position)))
(gnugo-push-move t pos) ; value always nil for non-pass move
- (let (gnugo-inhibit-refresh)
- (run-hooks 'gnugo-post-move-hook)
- (unless gnugo-inhibit-refresh
- (with-current-buffer buf
- (gnugo-refresh))))
+ (run-hooks 'gnugo-post-move-hook)
(with-current-buffer buf
+ (gnugo-refresh)
(gnugo-get-move (gnugo-get :gnugo-color)))))
(defun gnugo-mouse-move (e)
@@ -1638,11 +1628,9 @@ To start a game try M-x gnugo."
(gnugo-gate t)
(let ((donep (gnugo-push-move t "PASS"))
(buf (current-buffer)))
- (let (gnugo-inhibit-refresh)
- (run-hooks 'gnugo-post-move-hook)
- (unless gnugo-inhibit-refresh
- (with-current-buffer buf
- (gnugo-refresh))))
+ (run-hooks 'gnugo-post-move-hook)
+ (with-current-buffer buf
+ (gnugo-refresh))
(unless donep
(with-current-buffer buf
(gnugo-get-move (gnugo-get :gnugo-color))))))