From ddf06e2bfd7baf7d234892ed91edc5749a4dfb7e Mon Sep 17 00:00:00 2001 From: Robin Templeton Date: Tue, 24 Jun 2014 00:01:56 -0400 Subject: symbol default value procedures (Best-ability ChangeLog annotation added by Christopher Allan Webber.) * module/language/elisp/runtime.scm: (symbol-default-bound?, symbol-default-value, set-symbol-default-value!): New procedure aliases. Export their symbols. (emacs!): Update to accept new parameters dref, dset, dboundp. --- module/language/elisp/runtime.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/module/language/elisp/runtime.scm b/module/language/elisp/runtime.scm index bedb15a8a..ff01520ac 100644 --- a/module/language/elisp/runtime.scm +++ b/module/language/elisp/runtime.scm @@ -37,6 +37,9 @@ set-symbol-plist! symbol-bound? symbol-fbound? + symbol-default-bound? + symbol-default-value + set-symbol-default-value! bind-symbol makunbound! fmakunbound! @@ -193,6 +196,12 @@ (dynamic-bound? (variable-ref var)) #t))))) +(define symbol-default-bound? symbol-bound?) + +(define symbol-default-value symbol-value) + +(define set-symbol-default-value! set-symbol-value!) + (define (symbol-fbound? symbol) (set! symbol (schemify symbol)) (and @@ -225,10 +234,13 @@ (vector-set! (symbol-desc sym) 3 1) #nil) -(define (emacs! ref set boundp bind) +(define (emacs! ref set boundp dref dset dboundp bind) (set! symbol-value ref) (set! set-symbol-value! set) (set! symbol-bound? boundp) + (set! symbol-default-value dref) + (set! set-symbol-default-value! dset) + (set! symbol-default-bound? dboundp) (set! bind-symbol bind) (set! lexical-binding? (lambda () (symbol-value 'lexical-binding))) (set! set-lexical-binding-mode (lambda (x) (set-symbol-value! 'lexical-binding x)))) -- cgit v1.2.3