summaryrefslogtreecommitdiff
path: root/chess-pgn.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-13 11:13:33 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-13 11:13:33 +0000
commit7e960384fa89c02c2fc2be1f61fe18645f8a13fe (patch)
tree66d17d5fb9a7f73a3291e6261f1df2e12612eb2e /chess-pgn.el
parentf4639c9095c34caa60b4122e2cf4d6b1402508e3 (diff)
added message catalog support
Diffstat (limited to 'chess-pgn.el')
-rw-r--r--chess-pgn.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/chess-pgn.el b/chess-pgn.el
index 9d0ebf5..67ec901 100644
--- a/chess-pgn.el
+++ b/chess-pgn.el
@@ -11,6 +11,10 @@
(defvar chess-pgn-fill-column 60)
+(chess-message-catalog 'english
+ '((pgn-read-error . "Error reading move: %s")
+ (pgn-parse-error . "Error parsing PGN syntax")))
+
(defun chess-pgn-read-plies (game position &optional top-level)
(let ((plies (list t)) prevpos done)
(while (not (or done (eobp)))
@@ -23,7 +27,7 @@
(let* ((move (match-string 0))
(ply (chess-algebraic-to-ply position (match-string 0))))
(unless ply
- (error "Error reading move: %s" move))
+ (chess-error 'pgn-read-error move))
(setq position (chess-ply-next-pos ply))
(nconc plies (list ply))))
((and top-level
@@ -49,7 +53,7 @@
(looking-at ")"))
(forward-char)
(setq done t))
- (t (error "Error parsing PGN syntax")))
+ (t (chess-error 'pgn-parse-error)))
(skip-chars-forward " \t\n"))
(cdr plies)))