[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] modifying the variable *screen-mode-line-format* has no effect i
From: |
Alex Kost |
Subject: |
[STUMP] modifying the variable *screen-mode-line-format* has no effect if the mode line was turned on with `enable-mode-line' |
Date: |
Fri, 30 Aug 2013 00:42:35 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hello.
Compare these 2 variants:
1.
(enable-mode-line (current-screen) (current-head) nil) ;; disable
(setf *screen-mode-line-format* "foo")
(toggle-mode-line (current-screen) (current-head))
(setf *screen-mode-line-format* "bar")
And "foo" transforms into "bar" (respecting *mode-line-timeout*).
2.
(enable-mode-line (current-screen) (current-head) nil) ;; disable
(setf *screen-mode-line-format* "foo")
(enable-mode-line (current-screen) (current-head) t)
(setf *screen-mode-line-format* "bar")
And "foo" remains the same.
This happens because `enable-mode-line' passes the value of the variable
(*screen-mode-line-format*) to `toggle-mode-line' instead of its symbol
('*screen-mode-line-format*).
It's not clear for me if it's a bug or a feature, but i think it's
inappropriate behavior. So i suggest to make this slight modification:
diff --git a/mode-line.lisp b/mode-line.lisp
index d30dfb9..af74855 100644
--- a/mode-line.lisp
+++ b/mode-line.lisp
@@ -527,7 +527,7 @@
(if (head-mode-line head)
(when format
(setf (mode-line-format (head-mode-line head)) format))
- (toggle-mode-line screen head (or format *screen-mode-line-format*)))
+ (toggle-mode-line screen head (or format
'*screen-mode-line-format*)))
(when (head-mode-line head)
(toggle-mode-line screen head))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [STUMP] modifying the variable *screen-mode-line-format* has no effect if the mode line was turned on with `enable-mode-line',
Alex Kost <=