[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to update modelines of all displayed buffers
From: |
Andreas Politz |
Subject: |
Re: How to update modelines of all displayed buffers |
Date: |
Tue, 04 May 2010 15:44:52 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Cecil Westerhof <Cecil@decebal.nl> writes:
> I have defined the following function:
> (defun buffer-update-mode-line ()
> (setq buffer-mode-line (buffer-mode-line-extra))
> (force-mode-line-update t))
>
> The function buffer-mode-line-extra gives the extra data I want to
> display in the modeline.
>
> It is called every minute with:
> (run-with-timer 60 60 'buffer-update-mode-line)
>
> With this only the modeline of the current buffer is updated. In
> principal (force-mode-line-update t) makes all modelines updated, but
> that will only work if for every (visible) buffer buffer-mode-line is
> updated with the function buffer-mode-line-extra. Is there a way to get
> this done?
(defun displayed-buffer-list (&optional all-frames)
(flet ((fn (buf) (get-buffer-window buf all-frames)))
(remove-if-not #'fn (buffer-list))))
ap