
...and a very long exhaust hose so you don't kill yourself with the carbon monoxide?
Unless you perform a task that moves the mark before you jump back, of course
The following functions will save the current location to a register when going to the beginning of the file or end of file with M-. You can then go back to the last place you were with C-x r j 1
(defun lrd-int-char (char)
(cond
((and (fboundp 'characterp) (characterp char)) char)
((and (fboundp 'int-char) (integerp char)) (int-char char))
((integerp char) char)
(t (error "arg is not an int or a character"))))
(defadvice beginning-of-buffer
(before bob-register first () activate)
"When going to beginning of buffer, save point in register 1"
(point-to-register (lrd-int-char ?1)))
(defadvice end-of-buffer
(before eob-register first () activate)
"When going to end of buffer, save point in register 1"
(point-to-register (lrd-int-char ?1)))
Let's organize this thing and take all the fun out of it.