bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53629: 27.1: add option to change face `mode-line-buffer-id` when mo


From: José Júnior
Subject: bug#53629: 27.1: add option to change face `mode-line-buffer-id` when mode-line is inactive
Date: Sat, 5 Feb 2022 09:10:44 -0300

Thanks, I think it's perfect now. It would be good to have it documented, indeed.

On Sat, Feb 5, 2022 at 4:52 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
martin rudalics <rudalics@gmx.at> writes:

> I disregarded the useless complication that 'minibuffer-selected-window'
> returns nil when the selected window is not a minibuffer window.  Please
> try the below.
>
> martin
>
> (defun my-buffer-identification (fmt)
>   (list (propertize
>        fmt
>        'face (if (let ((window (selected-window)))
>                    (or (eq window (old-selected-window))
>                        (and (minibuffer-window-active-p (minibuffer-window))
>                             (with-selected-window (minibuffer-window)
>                               (eq window (minibuffer-selected-window))))))

Thanks; seems to work fine.  Perhaps we should make this into a utility
function and then document this technique in the manual in the mode line
section?

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]