summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Templeton <robin@terpri.org>2014-06-24 00:10:10 -0400
committerRicardo Wurmus <rekado@elephly.net>2020-04-04 16:24:21 +0200
commit4d27b8e3d0a0014adbd1ea99b4a31369fc054337 (patch)
tree9d25ca39e6094921415f5f66c4aac433493d5f78
parentddf06e2bfd7baf7d234892ed91edc5749a4dfb7e (diff)
defvar affects default value
(Best-ability ChangeLog annotation added by Christopher Allan Webber.) * module/language/elisp/compile-tree-il.scm (defvar): Refactor appropriately.
-rw-r--r--module/language/elisp/compile-tree-il.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm
index 8da1d583c..92b27115a 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -510,10 +510,13 @@
(make-conditional
loc
(make-call loc
- (make-module-ref loc runtime 'symbol-bound? #t)
+ (make-module-ref loc runtime 'symbol-default-bound? #t)
(list (make-const loc sym)))
(make-void loc)
- (set-variable! loc sym (compile-expr value)))
+ (make-call loc
+ (make-module-ref loc runtime 'set-symbol-default-value! #t)
+ (list (make-const loc sym)
+ (compile-expr value))))
(make-const loc sym))))
(else (report-error loc "Bad defvar" args))))