emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117009: Minor bytecomp.el fixes


From: Daniel Colascione
Subject: [Emacs-diffs] trunk r117009: Minor bytecomp.el fixes
Date: Tue, 22 Apr 2014 06:52:08 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117009
revision-id: address@hidden
parent: address@hidden
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Mon 2014-04-21 23:51:30 -0700
message:
  Minor bytecomp.el fixes
  
  * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
  Use lambda function values, not quoted lambdas.
  (byte-compile-recurse-toplevel): Remove extraneous &optional.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/bytecomp.el    bytecomp.el-20091113204419-o5vbwnq5f7feedwu-492
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-22 03:51:12 +0000
+++ b/lisp/ChangeLog    2014-04-22 06:51:30 +0000
@@ -1,7 +1,11 @@
 2014-04-22  Daniel Colascione  <address@hidden>
 
+       * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
+       Use lambda function values, not quoted lambdas.
+       (byte-compile-recurse-toplevel): Remove extraneous &optional.
+
        * emacs-lisp/cl-macs.el
-       (cl-struct-sequence-type,cl-struct-slot-info): Declare pure.
+       (cl-struct-sequence-type, cl-struct-slot-info): Declare pure.
        (cl-struct-slot-value): Conditionally use aref or nth so that the
        compiler produces optimal code.
 

=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el       2014-04-21 09:34:21 +0000
+++ b/lisp/emacs-lisp/bytecomp.el       2014-04-22 06:51:30 +0000
@@ -421,7 +421,7 @@
 
 (defvar byte-compiler-error-flag)
 
-(defun byte-compile-recurse-toplevel (form &optional non-toplevel-case)
+(defun byte-compile-recurse-toplevel (form non-toplevel-case)
   "Implement `eval-when-compile' and `eval-and-compile'.
 Return the compile-time value of FORM."
   ;; Macroexpand (not macroexpand-all!) form at toplevel in case it
@@ -439,28 +439,28 @@
     (funcall non-toplevel-case form)))
 
 (defconst byte-compile-initial-macro-environment
-  '(
+  `(
     ;; (byte-compiler-options . (lambda (&rest forms)
     ;;                        (apply 'byte-compiler-options-handler forms)))
     (declare-function . byte-compile-macroexpand-declare-function)
-    (eval-when-compile . (lambda (&rest body)
-                           (let ((result nil))
-                             (byte-compile-recurse-toplevel
-                              (cons 'progn body)
-                              (lambda (form)
-                                (setf result
-                                      (byte-compile-eval
-                                       (byte-compile-top-level
-                                        (byte-compile-preprocess form))))))
-                             (list 'quote result))))
-    (eval-and-compile . (lambda (&rest body)
-                          (byte-compile-recurse-toplevel
-                           (cons 'progn body)
-                           (lambda (form)
-                             (let ((compiled (byte-compile-top-level
-                                              (byte-compile-preprocess form))))
-                               (eval compiled)
-                               compiled))))))
+    (eval-when-compile . ,(lambda (&rest body)
+                                  (let ((result nil))
+                                    (byte-compile-recurse-toplevel
+                                     (cons 'progn body)
+                                     (lambda (form)
+                                       (setf result
+                                             (byte-compile-eval
+                                              (byte-compile-top-level
+                                               (byte-compile-preprocess 
form))))))
+                                    (list 'quote result))))
+    (eval-and-compile . ,(lambda (&rest body)
+                                 (byte-compile-recurse-toplevel
+                                  (cons 'progn body)
+                                  (lambda (form)
+                                    (let ((compiled (byte-compile-top-level
+                                                     (byte-compile-preprocess 
form))))
+                                      (eval compiled lexical-binding)
+                                      compiled))))))
   "The default macro-environment passed to macroexpand by the compiler.
 Placing a macro here will cause a macro to have different semantics when
 expanded by the compiler as when expanded by the interpreter.")


reply via email to

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