emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el


From: Colin Walters
Subject: [Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el
Date: Wed, 10 Apr 2002 19:16:46 -0400

Index: emacs/lisp/play/gamegrid.el
diff -c emacs/lisp/play/gamegrid.el:1.6 emacs/lisp/play/gamegrid.el:1.7
*** emacs/lisp/play/gamegrid.el:1.6     Wed Apr 10 15:13:35 2002
--- emacs/lisp/play/gamegrid.el Wed Apr 10 19:16:45 2002
***************
*** 407,413 ****
  (defun gamegrid-add-score (file score)
    "Add the current score to the high score file."
    (let ((result nil)
!       (errbuf (generate-new-buffer " *update-game-score loss*")))
      (let ((default-directory "/"))
        (apply
         'call-process
--- 407,423 ----
  (defun gamegrid-add-score (file score)
    "Add the current score to the high score file."
    (let ((result nil)
!       (errbuf (generate-new-buffer " *update-game-score loss*"))
!       (target (if game-score-directory
!                   file
!                 (let ((f (expand-file-name "~/.emacs.d/games")))
!                   (unless (eq (car-safe (file-attributes f))
!                               t)
!                     (make-directory f))
!                   (setq f (expand-file-name file f))
!                   (unless (file-exists-p f)
!                     (write-region "" nil f nil 'silent nil 'excl))
!                   f))))
      (let ((default-directory "/"))
        (apply
         'call-process
***************
*** 426,439 ****
                 user-mail-address)
                (t ""))
          ">  "
!         (current-time-string)))))
!       (if (buffer-modified-p errbuf)
!         (progn
!           (display-buffer errbuf)
!           (error "Failed to update game score file"))
!       (kill-buffer errbuf))))
!   (save-excursion
!     (find-file-read-only-other-window (expand-file-name file 
game-score-directory))))
        
  
  ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- 436,449 ----
                 user-mail-address)
                (t ""))
          ">  "
!         (current-time-string))))))
!     (if (buffer-modified-p errbuf)
!       (progn
!         (display-buffer errbuf)
!         (error "Failed to update game score file"))
!       (kill-buffer errbuf))
!     (save-excursion
!       (find-file-read-only-other-window target))))
        
  
  ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]