/[emacs]/emacs/lisp/play/gamegrid.el
ViewVC logotype

Diff of /emacs/lisp/play/gamegrid.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by walters, Wed Apr 10 19:13:35 2002 UTC revision 1.7 by walters, Wed Apr 10 23:16:45 2002 UTC
# Line 407  static char *noname[] = { Line 407  static char *noname[] = {
407  (defun gamegrid-add-score (file score)  (defun gamegrid-add-score (file score)
408    "Add the current score to the high score file."    "Add the current score to the high score file."
409    (let ((result nil)    (let ((result nil)
410          (errbuf (generate-new-buffer " *update-game-score loss*")))          (errbuf (generate-new-buffer " *update-game-score loss*"))
411            (target (if game-score-directory
412                        file
413                      (let ((f (expand-file-name "~/.emacs.d/games")))
414                        (unless (eq (car-safe (file-attributes f))
415                                    t)
416                          (make-directory f))
417                        (setq f (expand-file-name file f))
418                        (unless (file-exists-p f)
419                          (write-region "" nil f nil 'silent nil 'excl))
420                        f))))
421      (let ((default-directory "/"))      (let ((default-directory "/"))
422        (apply        (apply
423         'call-process         'call-process
# Line 426  static char *noname[] = { Line 436  static char *noname[] = {
436                   user-mail-address)                   user-mail-address)
437                  (t ""))                  (t ""))
438            ">  "            ">  "
439            (current-time-string)))))            (current-time-string))))))
440        (if (buffer-modified-p errbuf)      (if (buffer-modified-p errbuf)
441            (progn          (progn
442              (display-buffer errbuf)            (display-buffer errbuf)
443              (error "Failed to update game score file"))            (error "Failed to update game score file"))
444          (kill-buffer errbuf))))        (kill-buffer errbuf))
445    (save-excursion      (save-excursion
446      (find-file-read-only-other-window (expand-file-name file game-score-directory))))        (find-file-read-only-other-window target))))
447                    
448    
449  ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26