From 80f60ab4d9785b5d41aca1d486551f10d4864d97 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 23 Apr 2002 20:24:40 +0000 Subject: [PATCH] (gamegrid-add-score-with-update-game-score): Handle the case where we're already viewing the score file. --- lisp/play/gamegrid.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index edafee550e2..aff6a9bdec8 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -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)) -- 2.39.5