diff options
| author | Mario Lang <mlang@delysid.org> | 2004-01-16 09:45:56 +0000 |
|---|---|---|
| committer | Mario Lang <mlang@delysid.org> | 2004-01-16 09:45:56 +0000 |
| commit | 0c75dbedd64963eb24a53f83e0ad94aac5c7b37a (patch) | |
| tree | b8a3b9c348f650739c3b0c91dd583f3ab325f24d | |
| parent | 173fe0e74cf70e103fe0f209bee926a75df85733 (diff) | |
(chess-engine-create): Use `insern-soft' instead of `intern'
to copy the engine-regexp-alist.
| -rw-r--r-- | chess-engine.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/chess-engine.el b/chess-engine.el index 9d84dfa..57f1d19 100644 --- a/chess-engine.el +++ b/chess-engine.el @@ -77,27 +77,25 @@ (defsubst chess-engine-convert-fen (fen) (or (chess-fen-to-pos fen) - (ignore - (chess-message 'invalid-fen fen)))) + (ignore (chess-message 'invalid-fen fen)))) (defsubst chess-engine-convert-pgn (pgn) (or (chess-pgn-to-game pgn) - (ignore - (chess-message 'invalid-pgn)))) + (ignore (chess-message 'invalid-pgn)))) (defun chess-engine-default-handler (event &rest args) + "Default engine response handler." (let ((game (chess-engine-game nil))) (cond ((eq event 'move) (let ((chess-engine-handling-event t)) (when (and (car args) (chess-game-data game 'active)) - ;; if the game index is still 0, then our opponent ;; is white, and we need to pass over the move (when (and (not chess-engine-inhibit-auto-pass) (chess-game-data game 'my-color) - (= (chess-game-index game) 0)) + (zerop (chess-game-index game))) (chess-game-set-tag game "White" chess-engine-opponent-name) (chess-game-set-tag game "Black" chess-full-name) (chess-message 'now-black) @@ -296,7 +294,7 @@ (setq chess-engine-regexp-alist (copy-alist (symbol-value - (intern (concat (symbol-name module) "-regexp-alist")))) + (intern-soft (concat (symbol-name module) "-regexp-alist")))) chess-engine-response-handler (or response-handler 'chess-engine-default-handler)) (let ((proc chess-engine-process)) |
