diff options
| author | Mario Lang <mlang@delysid.org> | 2004-02-05 23:14:58 +0000 |
|---|---|---|
| committer | Mario Lang <mlang@delysid.org> | 2004-02-05 23:14:58 +0000 |
| commit | 9ae12499bfb544c692579c2daa3fae79f9a8bb69 (patch) | |
| tree | 3ae2bd68f11db1ba7d2770ee3829160dfda222d6 | |
| parent | 2188ee02e6ebf90338ab24aad72071a58733335e (diff) | |
docstrings, + a silly paren fix
| -rw-r--r-- | chess-file.el | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/chess-file.el b/chess-file.el index 565a493..dc385da 100644 --- a/chess-file.el +++ b/chess-file.el @@ -1,21 +1,31 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -;; A game database that stores PGN format games in a single file. +;; A game database that stores PGN format games or EPD format positions in +;; a single file. ;; -;; This is basically what you expect from a file ending in .pgn. +;; This is basically what you expect from a file ending in .pgn or .epd. ;; -(defvar chess-file-locations) - +(defvar chess-file-locations nil + "A list of starting positions of individual records of this collection.") (make-variable-buffer-local 'chess-file-locations) -(defvar chess-file-type nil) +(defvar chess-file-type nil + "The file format type of this database instance (a symbol). +See `chess-file-types' for details.") (make-variable-buffer-local 'chess-file-type) (defvar chess-file-types `((pgn "^\\[Event " chess-pgn-to-game chess-game-to-pgn (?\n ?\n)) (epd ,(concat chess-fen-regexp "\\(\\s-+.+\\);\\s-*$") - chess-epd-to-game chess-game-to-epd (?\n))))) + chess-epd-to-game chess-game-to-epd (?\n))) + "Alist of different file types. +Entries have the form (TYPE BEGIN-REGEXP TO-GAME FROM-GAME SEPARATOR) +where TYPE is a symbol (usually either 'pgn or 'epd), +BEGIN-REGEXP is the regexp to use for matching the beginning of new records, +TO-GAME and FROM-GAME are functions to use for reading and writing a game +object from/into the buffer and SEPARATOR is a list of characters to insert +inbetween of individual records.") (defun chess-file-handler (event &rest args) (cond |
