[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110760: Fix for gomoku-display-stati
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110760: Fix for gomoku-display-statistics. |
Date: |
Thu, 01 Nov 2012 10:25:08 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110760
fixes bug: http://debbugs.gnu.org/12771
author: Stephen Berman <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Thu 2012-11-01 10:25:08 +0800
message:
Fix for gomoku-display-statistics.
* play/gomoku.el (gomoku-display-statistics): Update mode line
only if in Gomoku buffer; don't capitalize "won".
modified:
lisp/ChangeLog
lisp/play/gomoku.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-10-31 10:02:51 +0000
+++ b/lisp/ChangeLog 2012-11-01 02:25:08 +0000
@@ -1,3 +1,8 @@
+2012-11-01 Stephen Berman <address@hidden>
+
+ * play/gomoku.el (gomoku-display-statistics): Update mode line
+ only if in Gomoku buffer; don't capitalize "won" (Bug#12771).
+
2012-10-31 Martin Rudalics <address@hidden>
* window.el (quit-restore-window): If the window has been
=== modified file 'lisp/play/gomoku.el'
--- a/lisp/play/gomoku.el 2012-09-01 01:04:26 +0000
+++ b/lisp/play/gomoku.el 2012-11-01 02:25:08 +0000
@@ -1054,16 +1054,18 @@
(defun gomoku-display-statistics ()
"Obnoxiously display some statistics about previous games in mode line."
- ;; We store this string in the mode-line-process local variable.
- ;; This is certainly not the cleanest way out ...
- (setq mode-line-process
- (format ": Won %d, lost %d%s"
- gomoku-number-of-human-wins
- gomoku-number-of-emacs-wins
- (if (zerop gomoku-number-of-draws)
- ""
- (format ", drew %d" gomoku-number-of-draws))))
- (force-mode-line-update))
+ ;; Update mode line only if Gomoku buffer is current (Bug#12771).
+ (when (string-equal (buffer-name) gomoku-buffer-name)
+ ;; We store this string in the mode-line-process local variable.
+ ;; This is certainly not the cleanest way out ...
+ (setq mode-line-process
+ (format ": won %d, lost %d%s"
+ gomoku-number-of-human-wins
+ gomoku-number-of-emacs-wins
+ (if (zerop gomoku-number-of-draws)
+ ""
+ (format ", drew %d" gomoku-number-of-draws))))
+ (force-mode-line-update)))
(defun gomoku-switch-to-window ()
"Find or create the Gomoku buffer, and display it."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110760: Fix for gomoku-display-statistics.,
Chong Yidong <=