diff options
| author | Mario Lang <mlang@delysid.org> | 2004-01-11 02:32:32 +0000 |
|---|---|---|
| committer | Mario Lang <mlang@delysid.org> | 2004-01-11 02:32:32 +0000 |
| commit | 8acaeea2e4f683c0aefa3c512567369f0de9b7dd (patch) | |
| tree | 61e9b8875103717d3ac10e3696cd65c17cec5b7c | |
| parent | 3a165b4807fcd3f456fd6d5e8c39e7c9ca6ea8c5 (diff) | |
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!
| -rw-r--r-- | chess-display.el | 12 |
1 files changed, 6 insertions, 6 deletions
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 () |
