diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-13 11:13:33 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-13 11:13:33 +0000 |
| commit | 7e960384fa89c02c2fc2be1f61fe18645f8a13fe (patch) | |
| tree | 66d17d5fb9a7f73a3291e6261f1df2e12612eb2e /chess-game.el | |
| parent | f4639c9095c34caa60b4122e2cf4d6b1402508e3 (diff) | |
added message catalog support
Diffstat (limited to 'chess-game.el')
| -rw-r--r-- | chess-game.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chess-game.el b/chess-game.el index 25d089d..c3d281a 100644 --- a/chess-game.el +++ b/chess-game.el @@ -163,10 +163,14 @@ matches." (let ((chess-game-inhibit-events t)) (chess-game-set-plies game (list ply)))))) +(chess-message-catalog 'english + '((undo-limit-reached . "Cannot undo further") + (add-to-completed . "Cannot add moves to a completed game"))) + (defun chess-game-undo (game count) "Undo the last COUNT plies of GAME." (if (> count (chess-game-index game)) - (error "Cannot undo further")) + (chess-error 'undo-limit-reached)) (let ((chess-game-inhibit-events t)) (chess-game-set-plies game (nbutlast (chess-game-plies game) count))) (chess-game-run-hooks game 'update)) @@ -208,7 +212,7 @@ progress (nil), if it is drawn, resigned, mate, etc." (changes (chess-ply-changes ply)) (position (chess-ply-pos ply))) (if (chess-ply-final-p current-ply) - (error "Cannot add moves to a completed game")) + (chess-error 'add-to-completed)) (assert (equal position (chess-ply-pos current-ply))) (chess-ply-set-changes current-ply changes) (chess-game-add-ply game (chess-ply-create |
