From 8acaeea2e4f683c0aefa3c512567369f0de9b7dd Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Sun, 11 Jan 2004 02:32:32 +0000 Subject: On GNU Emacs 21.3, :eval in mode-line-data seems only to work if it directly appears in mode-line-format. chess-display indirectly referenced chess-display-mode-line-format by setting mode-line-format to that symbol. If we set mode-line-format to the value of chess-display-mode-line-format, the mode-line comes to life again! --- chess-display.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chess-display.el') diff --git a/chess-display.el b/chess-display.el index 363f2c8..98845fb 100644 --- a/chess-display.el +++ b/chess-display.el @@ -208,11 +208,11 @@ also view the same game." (defun chess-display-clock-string () (let ((white (chess-game-data chess-module-game 'white-remaining)) (black (chess-game-data chess-module-game 'black-remaining))) - (if (not (and white black)) - (let ((last-ply (chess-game-ply chess-module-game - (1- chess-display-index)))) - (setq white (chess-ply-keyword last-ply :white) - black (chess-ply-keyword last-ply :black)))) + (unless (and white black) + (let ((last-ply (chess-game-ply chess-module-game + (1- chess-display-index)))) + (setq white (chess-ply-keyword last-ply :white) + black (chess-ply-keyword last-ply :black)))) (if (and white black) (format "W %s%02d:%02d B %s%02d:%02d " (if (and (< white 0) (= 0 (floor white))) "-" "") @@ -609,7 +609,7 @@ The key bindings available in this mode are: (use-local-map chess-display-mode-map) (buffer-disable-undo) (setq buffer-auto-save-file-name nil - mode-line-format 'chess-display-mode-line-format) + mode-line-format chess-display-mode-line-format) (setq chess-input-position-function (function (lambda () -- cgit v1.2.3