comparison lisp/play/gamegrid.el @ 44792:4648f6129f7f

(gamegrid-add-score-with-update-game-score): Handle the case where we're already viewing the score file.
author Colin Walters <walters@gnu.org>
date Tue, 23 Apr 2002 20:24:40 +0000
parents 9bdd94e7a205
children 78b836bc2213
comparison
equal deleted inserted replaced
44791:3969f8273bc8 44792:4648f6129f7f
448 (progn 448 (progn
449 (display-buffer errbuf) 449 (display-buffer errbuf)
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))
458 (find-file-other-window file) 464 (find-file-other-window file)
459 (setq buffer-read-only nil) 465 (setq buffer-read-only nil)