std-save-ucs, std-restore-ucs


Synopsis

(std-save-ucs) ; saves current ucs

(std-restore-ucs <ucs>) ; restores saved ucs

Description

These two complementing functions are used in error handling to save the current UCS on init and restore the old state on restore.

STD-SAVE-UCS returns a UCS object, which migh be a list or a UCS name and is usable for std-restore-ucs only.

STD-RESTORE-UCS takes the UCS object which may be a name of a UCS or the UCS object returned by std-save-ucs and sets the UCS according to this object.

The ucs object must completely describe a UCS, the origin and two directions and might be string naming a UCS or a list of three 3d-vectors. This is implementation dependent.

If the ucs 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 '((:UCS))) and (STD-VAR-RESTORE) resp. (STD-VAR-PUSH alist) and (STD-VAR-POP), esp. on user-breaks or errors

Example

(std-var-init '((:UCS)))
(command "_UCS" "_O" pt)
...
(std-var-restore)

Arguments

ucs: an ucs object, which may be a list or a string.

Return Value

STD-SAVE-UCS returns an ucs object.

The return value of STD-RESTORE-UCS is undefined.

Side Effects

std-restore-ucs changes the current UCS.

Module

(std-require 'STDTBL)

Defined in STDTBL