haven't decided if i like that yet, but it leaves the mark on the far
side of (point) and (mark) when you move to beginning or end of buffer.
greg
>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje>
Hrvoje> greg(a)alphatech.com (Greg Klanderman) writes:
> (defun gk:beginning-of-buffer ()
> "Move point to the beginning of the buffer."
> (interactive "_")
> (if zmacs-region-active-p
> (if (> (point) (mark))
> (exchange-point-and-mark))
> (push-mark))
> (goto-char (point-min)))
Hrvoje>
Hrvoje> I don't understand your (> (point) (mark)) check. If I were to change
Hrvoje> beginning-of-buffer, I'd make a simpler change:
Hrvoje>
Hrvoje> (defun ...
Hrvoje> (interactive "_")
Hrvoje> (unless (region-active-p)
Hrvoje> (push-mark))
Hrvoje> ;; the rest of the function -- a bit more complex than this, but
Hrvoje> ;; essentially the same:
Hrvoje> (goto-char (point-min)))