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

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

[debbugs-tracker] bug#18233: closed (24.3.92; Use of (frame-selected-win


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#18233: closed (24.3.92; Use of (frame-selected-window) in mode-line-format)
Date: Sat, 09 Aug 2014 22:23:02 +0000

Your message dated Sat,  9 Aug 2014 18:22:06 -0400 (EDT)
with message-id <address@hidden>
and subject line Re: bug#18233: 24.3.92; Use of (frame-selected-window) in 
mode-line-format
has caused the debbugs.gnu.org bug report #18233,
regarding 24.3.92; Use of (frame-selected-window) in mode-line-format
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
18233: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18233
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.92; Use of (frame-selected-window) in mode-line-format Date: Sat, 9 Aug 2014 17:18:16 -0400 (EDT)
severity: wishlist

    emacs -q
    C-x 2
    M-: (push '(:eval (if (eq (frame-selected-window)
                              (selected-window))
                          "A" "B"))
              mode-line-format) RET

Both mode-lines expose an 'A'-Marker.

In Emacs 24.3 the mode-line of the window that is not the user selected
one is marked with 'B'.

I realise this subtle change is not exactly a bug.  The old behaviour is
useful and used already, though.[1]

[1] 
https://github.com/milkypostman/highline/blob/1621662e886afa5948e8fccf0037d6c2a718e9a0/highline.el#L326



--- End Message ---
--- Begin Message --- Subject: Re: bug#18233: 24.3.92; Use of (frame-selected-window) in mode-line-format Date: Sat, 9 Aug 2014 18:22:06 -0400 (EDT)
Stefan Monnier <address@hidden> writes:
> So we won't go back to the old behavior.  Instead we should provide
> a new feature for that.  IIRC you can currently do it by hand with
> something like:
>
> (add-function :before pre-redisplay-function
>               (lambda (_) (setq my-selected-window (selected-window))))
>
> and then compare (deleted-window) to my-selected-window in your
> mode-line-format.

Works great.  Thanks a lot!


--- End Message ---

reply via email to

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