all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* mode-line-format - local variableness
@ 2009-04-05 22:18 Drew Adams
  2009-04-05 22:50 ` Johan Bockgård
  2009-04-06  1:37 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Drew Adams @ 2009-04-05 22:18 UTC (permalink / raw)
  To: emacs-devel

(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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-04-06 21:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-05 22:18 mode-line-format - local variableness Drew Adams
2009-04-05 22:50 ` Johan Bockgård
2009-04-05 23:24   ` Miles Bader
2009-04-05 23:29   ` Drew Adams
2009-04-05 23:37     ` Drew Adams
2009-04-06  0:50       ` Miles Bader
2009-04-06  3:05         ` Drew Adams
2009-04-06  1:37 ` Stefan Monnier
2009-04-06  3:19   ` Drew Adams
2009-04-06 13:30     ` Stefan Monnier
2009-04-06 21:37       ` Miles Bader

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.