Subject: bug#38164: quit-restore-window doesn't restore point in man

From: Juri Linkov <[email-masked]>
Date: Sun, 10 Nov 2019 22:45:08 +0200

Creating a new bug report as a spin-off of bug#19064.

>> But this problem is not new.  The same can be reproduced
>> in older versions with
>>
>> (progn
>>    (man "XYZ")
>>    (read-string "-->"))
>>
>> This is because quit-restore-window moves point to wrong window.
>
> What should 'quit-restore-window' do here in particular?

quit-restore-window should move point to old-selected-window,
i.e. the minibuffer window that was selected before Man-bgproc-sentinel
kicked in.  But I don't understand why it's not doing that.