guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 25/36: only evaluate top-level macro definitions


From: Christopher Allan Webber
Subject: [Guile-commits] 25/36: only evaluate top-level macro definitions
Date: Tue, 19 Oct 2021 18:11:29 -0400 (EDT)

cwebber pushed a commit to branch wip-elisp-rebased
in repository guile.

commit 31761a62217b2ffe67f9f391582026cce456fe3a
Author: Robin Templeton <robin@terpri.org>
AuthorDate: Mon Aug 11 06:04:28 2014 -0400

    only evaluate top-level macro definitions
    
    (Best-ability ChangeLog annotation added by Christine Lemmer-Webber.)
    
    * module/language/elisp/compile-tree-il.scm (defmacro): Check to see
      whether toplevel? is true before compiling a macro.
---
 module/language/elisp/compile-tree-il.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/module/language/elisp/compile-tree-il.scm 
b/module/language/elisp/compile-tree-il.scm
index 29c769d..6c3f7bd 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -786,9 +786,10 @@
                                           args
                                           body))))
                   (make-const loc name))))
-           (with-native-target
-            (lambda ()
-              (compile tree-il #:from 'tree-il #:to 'value)))
+           (when (fluid-ref toplevel?)
+             (with-native-target
+              (lambda ()
+                (compile tree-il #:from 'tree-il #:to 'value))))
            tree-il)))
     (else (report-error loc "bad defmacro" args))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]