std-save-view, std-restore-view | ![]() |
These two complementing functions are used in error handling to save the current view on init and restore the old state on restore.
STD-SAVE-VIEW returns a object which uniquely defines the view, which might be a list or a VIEW name and is usable for std-restore-view only.
STD-RESTORE-view takes the object returned by std-save-view, which may be a name of a VIEW or any other implementation defined object and sets the VIEW according to this object. If the view argument is a name and the first character is "$" then the symbol table is restored and deleted, otherwise only restored.
Both functions are normally used by the error handling pair (STD-VAR-INIT '((:VIEW))) and (STD-VAR-RESTORE) resp. (STD-VAR-PUSH alist) and (STD-VAR-POP) if the ZOOM, PAN, VPOINT or any VIEW changing command is used inside the user function, to save and restore the old setting, esp. on user-breaks or errors.
(std-var-init '((:VIEW))) ... (command "'_VPOINT" "_R" "225" "15") ... (std-var-restore)
view: most likely a string, but it could be any other lisp object as well.
STD-SAVE-VIEW returns a view object which is currently a string.
The return value of STD-RESTORE-VIEW is nil.
STD-RESTORE-VIEW changes the current VIEW.
(std-require 'STDTBL)
Defined in STDTBL