I am writing a function to select a region (say 2 lines).
(defun select-some-region () (interactive) (push-mark (point) nil t) (forward-line 2))
When point is in a buffer like this
|this is first this is second this is third
If I run
M-x select-some-region it will select two line and I press
C-g it will deselect the region but leaves point somewhere else like this.
this is first this is second |this is third
How can I leave point in actual position where it was before when
C-g is pressed?
In my actual
select-some-regions function, I have to select few lines before point and few lines after point.