diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-24 19:28:46 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-24 19:28:46 +0000 |
| commit | 6f87d139a4e19a318de49905bbb1176ee1de33a8 (patch) | |
| tree | 584f6fc92b52efabe19ceefe6409d362d1549dfb | |
| parent | b5ac31247f552baa44773734bc02575f0c4703de (diff) | |
*** no comment ***
| -rw-r--r-- | chess-common.el | 6 | ||||
| -rw-r--r-- | chess-display.el | 4 | ||||
| -rw-r--r-- | chess-ics.el | 2 | ||||
| -rw-r--r-- | chess-input.el | 4 | ||||
| -rw-r--r-- | chess-pos.el | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/chess-common.el b/chess-common.el index c6ed7d8..faef364 100644 --- a/chess-common.el +++ b/chess-common.el @@ -48,7 +48,11 @@ (chess-game-set-data game 'active t)) ((eq event 'destroy) - (chess-engine-send nil "quit\n") + (let ((proc (get-buffer-process (current-buffer)))) + (if (and (processp proc) + (memq (process-status proc) '(run open))) + (chess-engine-send nil "quit\n"))) + (dolist (file chess-common-temp-files) (if (file-exists-p file) (delete-file file))) diff --git a/chess-display.el b/chess-display.el index a4c03fb..271d4b6 100644 --- a/chess-display.el +++ b/chess-display.el @@ -274,6 +274,10 @@ also view the same game." (chess-pos-piece position from) to)) (setq ch (cddr ch))))))) +(chess-message-catalog 'english + '((not-your-move . "It is not your turn to move") + (game-is-over . "This game is over"))) + (defun chess-display-move (display ply &optional prev-pos pos) "Move a piece on DISPLAY, by applying the given PLY. The position of PLY must match the currently displayed position. diff --git a/chess-ics.el b/chess-ics.el index ba3aab7..6de470a 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -187,7 +187,7 @@ who is black." t)) (defvar chess-ics-regexp-alist - (list (cons "^[^% \t\n\r]+%" + (list (cons "[A-Za-z0-9_]+%" (function (lambda () (chess-engine-send nil "set style 12\n") diff --git a/chess-input.el b/chess-input.el index 8fa0e19..54afabe 100644 --- a/chess-input.el +++ b/chess-input.el @@ -19,10 +19,6 @@ (make-variable-buffer-local 'chess-input-position-function) (make-variable-buffer-local 'chess-input-move-function) -(chess-message-catalog 'english - '((not-your-move . "It is not your turn to move") - (game-is-over . "This game is over"))) - (defun chess-input-test-move (move-ply) "Return the given MOVE if it matches the user's current input." (let* ((move (cdr move-ply)) diff --git a/chess-pos.el b/chess-pos.el index 7e4e2bd..04111c5 100644 --- a/chess-pos.el +++ b/chess-pos.el @@ -289,7 +289,7 @@ If BLANK is non-nil, all of the squares will be empty. The current side-to-move is always white." (if blank (vconcat (make-vector 64 ? ) - [nil nil nil nil nil nil t nil nil nil]) + [nil nil nil nil nil nil t nil nil nil nil]) (chess-pos-copy chess-starting-position))) (defsubst chess-rf-to-index (rank file) |
