ttn pushed a commit to branch master in repository elpa. commit 9060d26640ec99de649bf1c2a14c83ed8828c064 Author: Thien-Thi Nguyen <t...@gnu.org> Date: Thu Apr 24 15:00:37 2014 +0200
[gnugo] Make undo commands silently handle overkill. It's impolite to reflect impoliteness. :-D * packages/gnugo/gnugo.el (gnugo--climb-towards-root): Don't use ‘gnugo--q/ue’ for GTP "undo"; instead, use ‘gnugo--q’, detect overkill, and stop looping. --- packages/gnugo/NEWS | 1 + packages/gnugo/gnugo.el | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/gnugo/NEWS b/packages/gnugo/NEWS index 6898cf0..da24303 100644 --- a/packages/gnugo/NEWS +++ b/packages/gnugo/NEWS @@ -33,6 +33,7 @@ NB: "RCS: X..Y " means that the particular release includes - new major mode: GNUGO Frolic (gnugo-frolic-mode) - GNUGO Board mode now derived from Special mode - position arg validated for direct GTP commands ‘undo’, ‘gg-undo’ + - undo commands no longer signal error on overkill - performance improvements - of interest to hackers (see source, BI => backward incompatible) - dropped var: ‘gnugo-inhibit-refresh’ (BI) diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el index 24adb49..e8e7a71 100644 --- a/packages/gnugo/gnugo.el +++ b/packages/gnugo/gnugo.el @@ -1979,8 +1979,8 @@ If FILENAME already exists, Emacs confirms that you wish to overwrite it." (cdr hmm))))) (when (gnugo-get :game-over) (gnugo--unclose-game)) - (while (not (eq stop (aref monkey 0))) - (gnugo--q/ue "undo") + (while (and (not (eq stop (aref monkey 0))) + (gnugo--no-worries (gnugo--q "undo"))) (pop (aref monkey 0)) (gnugo-put :last-mover (gnugo-current-player)) (gnugo-merge-showboard-results) ; all