]> git.eshelyaron.com Git - emacs.git/commitdiff
ignore anonymous forms (they are not functions)
authorAndrea Corallo <akrl@sdf.org>
Mon, 30 Sep 2019 15:04:49 +0000 (17:04 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:55 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index cd1a6b2e931e8ef73505903c6e7c13477d283540..796c130efaa52c521f6642ccfe33208382675099 100644 (file)
@@ -408,11 +408,8 @@ Put PREFIX in front of it."
                              ('defvar (cdr x))
                              ('defconst (cdr x))))
                          byte-to-native-top-level-forms)))
-  ;; Hacky! We need to reverse `byte-to-native-lap' to have the compiled top
-  ;; level form that matters (ex exclude lambdas)...
-  (cl-loop with lap-funcs = byte-to-native-lap
-           for (name . bytecode) in byte-to-native-bytecode
-           for lap = (cdr (assoc name lap-funcs))
+  (cl-loop for (name . bytecode) in (remove-if-not #'car byte-to-native-bytecode)
+           for lap = (cdr (assoc name byte-to-native-lap))
            for lambda-list = (aref bytecode 0)
            for func = (make-comp-func :symbol-name name
                                       :byte-func bytecode