Subject: Re: bug#33871: 27.0.50; Revert Dired window saved in window configuration

From: Juri Linkov <[email-masked]>
Date: Tue, 09 Apr 2024 09:44:34 +0300

> Note that
>
> +       (with-selected-window w
> +         (when (functionp window-set-context-function)
>
> and
>
> +           (with-selected-window w
> +             (when-let ((context (window-parameter w 'context)))
>
> would set up a precedence case for the future use of
> 'window-set-context-function'.  Are you sure that you always want to
> select the window in question here or would it suffice to pass the
> window as argument to the context function?

With 'with-selected-window' the code was so simple: just one call
'with-selected-window' and no special handling needed.  But
without 'with-selected-window' the code became more complicated
and error-prone.  I just found another place that needed to use
the window's buffer, and fixed it.  I don't know maybe
'with-selected-window' was not too bad?  Or it has other problems?