From abac70f198fc6502e3b4d81f9d9590e9d7432378 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 30 Sep 2019 17:04:49 +0200 Subject: [PATCH] ignore anonymous forms (they are not functions) --- lisp/emacs-lisp/comp.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index cd1a6b2e931..796c130efaa 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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 -- 2.39.5