summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Templeton <robin@terpri.org>2014-06-24 00:01:56 -0400
committerRicardo Wurmus <rekado@elephly.net>2020-04-04 16:24:21 +0200
commitddf06e2bfd7baf7d234892ed91edc5749a4dfb7e (patch)
tree0fcb86e04d7643e60c1832eb5a5d9f603eba4706
parent95b0565332f6f79ea6f1a33f396928cb2b37d6fb (diff)
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.
-rw-r--r--module/language/elisp/runtime.scm14
1 files changed, 13 insertions, 1 deletions
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))))