(Recall that switch-to-buffer-preserve-window-point is nowadays t by
What happens is that window--before-delete-windows works with markers,
and if that signals an error, the whole command is aborted. All you
get is this unhelpful error message:
Marker does not point anywhere
Fortunately, mouse-delete-window and mouse-delete-other-windows don't
have the code shown above, so I was able to work around the problem by
using those mouse commands. Another workaround is to temporarily
reset switch-to-buffer-preserve-window-point, but that is only
apparent if you read the code and realize or know that
window--before-delete-windows is the one that signals the error.
Should we perhaps run this with demoted errors in the interactive
case, so that users aren't locked when something like that happens?
(I will try to figure out which marker becomes invalid and why.)
In GNU Emacs 27.2 (build 2, i686-pc-mingw32)
of 2021-03-25 built on HOME-C4E4A596F7
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v18.104.22.16800)
For information about GNU Emacs and the GNU system, type C-h C-a.
value of $LANG: ENU
Major mode: Lisp Interaction
Minor modes in effect: