Subject: bug#18739: 24.3; Request for a hook to be provided when scrolling will move the cursor

From: Eli Zaretskii <[email-masked]>
Date: Thu, 16 Oct 2014 10:50:59 +0300

> From: Andreas Schwab <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 16 Oct 2014 09:38:18 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Andreas Schwab <[email-masked]>
> >> Cc: Josh Hunsaker <[email-masked]>,  [email-masked],  [email-masked]
> >> Date: Thu, 16 Oct 2014 09:15:08 +0200
> >> 
> >> Eli Zaretskii <[email-masked]> writes:
> >> 
> >> >> From: Josh Hunsaker <[email-masked]>
> >> >> Date: Wed, 15 Oct 2014 14:12:49 -0700
> >> >> Cc: [email-masked], [email-masked]
> >> >> 
> >> >> > The usual technique in Emacs is to put the mark where you were before
> >> >> > scrolling.  Then "C-x C-x" will get you back.
> >> >> 
> >> >> This requires the forethought to set the mark before scrolling.
> >> >
> >> > No, you can do it always.
> >> 
> >> Then you lose the previous mark.
> >
> > Not if it's pushed.
> 
> C-x C-x only uses the current mark.

Which is what the OP wants.  Later, he can restore the other marks
from the ring, if that is needed.