[Top][All Lists]

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

window-configurations and marks

From: Stefan Monnier
Subject: window-configurations and marks
Date: Thu, 24 Apr 2014 09:15:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

A lot of code assumes that "mark-active non-nil implies that (mark)
points somewhere", and I think it's a reasonable assumption.

But occasionally this property is invalid.  One place I found where
it can be invalidated is in set-window-configuration because
window-configurations keep a copy of the mark, which is hence reset by
set-window-configuration without paying attention to its connection to

I just installed a patch which changes set-window-configuration so as to
call deactivate-mark when mark-active is non-nil and we set the mark to
point nowhere.  But I don't like this patch:
- I don't like to idea of running arbitrary Elisp code from the middle of
- It calls for calling activate-mark in the reverse case.
- It's done "per-window" whereas the mark is "per-buffer".

So, I'm really thinking that the better fix is to change
set-window-configuration such that it does not touch the mark (which
really doesn't have anything to do with windows or
window-configurations, and indeed window-state doesn't include
information about the mark).

Any objection?


reply via email to

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