diff options
| author | Colin Walters | 2002-04-23 20:24:40 +0000 |
|---|---|---|
| committer | Colin Walters | 2002-04-23 20:24:40 +0000 |
| commit | 80f60ab4d9785b5d41aca1d486551f10d4864d97 (patch) | |
| tree | 72d56e5506e5dc4517aad0bbb768d80d030a5981 | |
| parent | eacdfade34a628c8dc15ee9e5636725f99ede7d7 (diff) | |
| download | emacs-80f60ab4d9785b5d41aca1d486551f10d4864d97.tar.gz emacs-80f60ab4d9785b5d41aca1d486551f10d4864d97.zip | |
(gamegrid-add-score-with-update-game-score): Handle the case where
we're already viewing the score file.
| -rw-r--r-- | lisp/play/gamegrid.el | 10 |
1 files 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[] = { | |||
| 450 | (error "Failed to update game score file")) | 450 | (error "Failed to update game score file")) |
| 451 | (kill-buffer errbuf)) | 451 | (kill-buffer errbuf)) |
| 452 | (save-excursion | 452 | (save-excursion |
| 453 | (find-file-read-only-other-window target)))) | 453 | (let ((buf (find-buffer-visiting target))) |
| 454 | 454 | (if buf | |
| 455 | (progn | ||
| 456 | (with-current-buffer buf | ||
| 457 | (revert-buffer nil t nil)) | ||
| 458 | (display-buffer buf)) | ||
| 459 | (find-file-read-only-other-window target)))))) | ||
| 460 | |||
| 455 | (defun gamegrid-add-score-insecure (file score) | 461 | (defun gamegrid-add-score-insecure (file score) |
| 456 | (save-excursion | 462 | (save-excursion |
| 457 | (setq file (expand-file-name file temporary-file-directory)) | 463 | (setq file (expand-file-name file temporary-file-directory)) |