]> git.eshelyaron.com Git - emacs.git/commitdiff
(gamegrid-add-score-with-update-game-score): Handle the case where
authorColin Walters <walters@gnu.org>
Tue, 23 Apr 2002 20:24:40 +0000 (20:24 +0000)
committerColin Walters <walters@gnu.org>
Tue, 23 Apr 2002 20:24:40 +0000 (20:24 +0000)
we're already viewing the score file.

lisp/play/gamegrid.el

index edafee550e21c9f0651a57421f8ec09bfd744c34..aff6a9bdec8815600fd7e0d7eaa46917c70d55ff 100644 (file)
@@ -450,8 +450,14 @@ static char *noname[] = {
          (error "Failed to update game score file"))
       (kill-buffer errbuf))
     (save-excursion
-      (find-file-read-only-other-window target))))
-       
+      (let ((buf (find-buffer-visiting target)))
+       (if buf
+           (progn
+             (with-current-buffer buf
+               (revert-buffer nil t nil))
+             (display-buffer buf))
+         (find-file-read-only-other-window target))))))
+
 (defun gamegrid-add-score-insecure (file score)
   (save-excursion
     (setq file (expand-file-name file temporary-file-directory))