[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mode-line-format - local variableness
From: |
Drew Adams |
Subject: |
mode-line-format - local variableness |
Date: |
Sun, 5 Apr 2009 15:18:37 -0700 |
(defun foo (text &optional buffer)
"Display TEXT in BUFFER's mode line for 2 sec."
(with-current-buffer (or buffer (current-buffer))
(let ((mode-line-format text))
(force-mode-line-update) (sit-for 2))
(force-mode-line-update)))
M-: (foo "JJJJJ" "*scratch*")
In Emacs 20, JJJJJ is displayed in the mode-line of buffer *scratch* only. The
mode lines of other buffers are unaffected.
In Emacs 21 and later, *each* buffer's mode-line shows JJJJJ.
What am I missing? `mode-line-format' is a buffer-local variable. That makes me
think the Emacs 20 behavior is correct and the behavior since then is incorrect.
I assume I must be missing something here. Can someone please clue me in? Thx.
- mode-line-format - local variableness,
Drew Adams <=
Re: mode-line-format - local variableness, Stefan Monnier, 2009/04/05