emacs-devel
[Top][All Lists]
Advanced

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

Re: Let mode-line packages distinguish the selected-window


From: Eli Zaretskii
Subject: Re: Let mode-line packages distinguish the selected-window
Date: Sun, 27 Oct 2019 07:01:28 +0200

> Cc: address@hidden
> From: martin rudalics <address@hidden>
> Date: Sat, 26 Oct 2019 23:10:53 +0200
> 
> (or (eq (selected-window) (old-selected-window))
>      (and (not (zerop (minibuffer-depth)))
>        (eq (selected-window)
>            (with-selected-window (minibuffer-window)
>              (minibuffer-selected-window)))))
> 
> should handle all concerns.  To get rid of the 'with-selected-window'
> 'minibuffer-selected-window' should accept an optional argument in
> order to skip the
> 
> && MINI_WINDOW_P (XWINDOW (selected_window))
> 
> check.

If we are going to add this feature as a C primitive, it should
ideally free the Lisp programmers from jumping through any additional
hoops, IMO.  So the above should be done in C instead, before
returning the value.  If some applications may want the minibuffer
window and others won't, we should make the function accept an
optional argument to select between these two alternatives.



reply via email to

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