summaryrefslogtreecommitdiff
path: root/chess-autosave.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-05-01 06:07:25 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-05-01 06:07:25 +0000
commit986af48943f06c660b935551c1be38ec2153fe32 (patch)
tree6c2320f971de5b8e05b2415b457283e8034bf8fd /chess-autosave.el
parent4917d45b9eb5a09002b2f5006fe9e5b818ecc608 (diff)
*** no comment ***
Diffstat (limited to 'chess-autosave.el')
-rw-r--r--chess-autosave.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/chess-autosave.el b/chess-autosave.el
index 03c7574..efb90df 100644
--- a/chess-autosave.el
+++ b/chess-autosave.el
@@ -15,9 +15,10 @@
:group 'chess-autosave)
(chess-message-catalog 'english
- '((chess-read-autosave . "There is a chess autosave file, read it? ")
- (chess-delete-autosave . "Delete the autosave file? ")
- (chess-disable-autosave . "Disable autosaving for this game? ")))
+ '((chess-read-autosave . "There is a chess autosave file, read it? ")
+ (chess-delete-autosave . "Delete the autosave file? ")
+ (chess-disable-autosave . "Disable autosaving for this game? ")
+ (autosave-available . "There is an autosave file; type ~ after connecting to read it")))
(defun chess-autosave-handler (game event &rest args)
(cond
@@ -39,6 +40,10 @@
(if (y-or-n-p (chess-string 'chess-disable-autosave))
(chess-autosave-handler game 'disable-autosave))))))
+ ((eq event 'announce-autosave)
+ (if (file-readable-p chess-autosave-file)
+ (chess-message 'autosave-available)))
+
((eq event 'disable-autosave)
(chess-autosave-handler game 'destroy)
(chess-module-destroy (current-buffer)))