[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el,v |
Date: |
Sat, 03 Mar 2007 12:15:23 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 07/03/03 12:15:23
Index: gamegrid.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/play/gamegrid.el,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- gamegrid.el 28 Jan 2007 19:40:31 -0000 1.26
+++ gamegrid.el 3 Mar 2007 12:15:23 -0000 1.27
@@ -514,7 +514,17 @@
(defun gamegrid-add-score-with-update-game-score-1 (file target score)
(let ((default-directory "/")
- (errbuf (generate-new-buffer " *update-game-score loss*")))
+ (errbuf (generate-new-buffer " *update-game-score loss*"))
+ (marker-string (concat
+ (user-full-name)
+ " <"
+ (cond ((fboundp 'user-mail-address)
+ (user-mail-address))
+ ((boundp 'user-mail-address)
+ user-mail-address)
+ (t ""))
+ "> "
+ (current-time-string))))
;; This can be called from a timer, so enable local quits.
(with-local-quit
(apply
@@ -529,28 +539,25 @@
(file-name-directory target))
file
(int-to-string score)
- (concat
- (user-full-name)
- " <"
- (cond ((fboundp 'user-mail-address)
- (user-mail-address))
- ((boundp 'user-mail-address)
- user-mail-address)
- (t ""))
- "> "
- (current-time-string))))))
+ marker-string))))
(if (buffer-modified-p errbuf)
(progn
(display-buffer errbuf)
(error "Failed to update game score file"))
(kill-buffer errbuf))
(let ((buf (find-buffer-visiting target)))
+ (save-excursion
(if buf
(progn
- (with-current-buffer buf
- (revert-buffer nil t nil))
+ (switch-to-buffer buf)
+ (revert-buffer nil t nil)
(display-buffer buf))
- (find-file-read-only-other-window target)))))
+ (find-file-read-only target))
+ (goto-char (point-min))
+ (search-forward (concat (int-to-string score)
+ " " (user-login-name) " "
+ marker-string))
+ (beginning-of-line)))))
(defun gamegrid-add-score-insecure (file score &optional directory)
(save-excursion
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/play/gamegrid.el,v,
Eli Zaretskii <=