From: Andrea Corallo Date: Mon, 30 Sep 2019 15:04:49 +0000 (+0200) Subject: ignore anonymous forms (they are not functions) X-Git-Tag: emacs-28.0.90~2727^2~1097 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=abac70f198fc6502e3b4d81f9d9590e9d7432378;p=emacs.git ignore anonymous forms (they are not functions) --- 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