1 (define-module (lang elisp internals set)
2 #:use-module (lang elisp internals evaluation)
3 #:use-module (lang elisp internals signal)
6 ;; Set SYM's variable value to VAL, and return VAL.
8 (if (module-defined? the-elisp-module sym)
9 (module-set! the-elisp-module sym val)
10 (module-define! the-elisp-module sym val))
13 ;; Return SYM's variable value. If it has none, signal an error if
14 ;; MUST-EXIST is true, just return #nil otherwise.
15 (define (value sym must-exist)
16 (if (module-defined? the-elisp-module sym)
17 (module-ref the-elisp-module sym)
19 (error "Symbol's value as variable is void:" sym)