home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
editor
/
me_cd.arc
/
SPOINT.MUT
< prev
next >
Wrap
Text File
|
1988-05-15
|
698b
|
25 lines
;; spoint.mut :
;; Save and restore point of current buffer through buffer changes
;; Kinda like GosMacs save-excursion
;; Note: leaves some garbage on the msg line - you may want to (msg "").
(const CMARK 9) ; the mark to use to save the cursor
(string saved-buffer-name 20) ; the buffer to return to
(int wrow) ; the screen row the cursor is on
(defun
save-point HIDDEN
{
(saved-buffer-name (buffer-name -1))
(arg-prefix CMARK)(set-mark) ; save the cursor
(wrow (window-row))
}
restore-point HIDDEN
{
(switch-to-buffer saved-buffer-name)
(arg-prefix CMARK)(exchange-dot-and-mark)
(arg-prefix wrow)(reposition-window)
}
)