Hrvoje Niksic writes:
Kyle Jones <kyle_jones(a)wonderworks.com> writes:
> Easily reproducible. The problem is that the selection is stored as
> the region between the buffer's point marker and the buffer mark.
Couldn't it store the region between (region-beginning) and
(region-end)? That seems to hold information that is synchronized
with the visual information displayed by zmacs-regions.
region-beginning/region-end will return different values depending
on which window displaying a buffer is the selected window, so it
suffers from the same problem. The zmacs-region extent could almost
be used, as its endpoints are not altered by mere selection of a
window. But the extent isn't updated if zmacs-regions == nil so
the extent won't be covering the correct region if the user isn't
using zmacs-regions.
I think saving w->pointm and b->mark are enough. There's no way
to get w->pointm from Lisp, so a window-point-marker function
will need to be created.