From 0ae14c17a24545dacf8ed309b2a75f8f1ed7da5c Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 5 Oct 2019 14:48:15 +0200 Subject: [PATCH] fix compilation of devar defconst with doc string --- lisp/emacs-lisp/bytecomp.el | 2 +- lisp/emacs-lisp/comp.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1666dff7117..72e58350209 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2276,7 +2276,7 @@ we output that argument and the following argument QUOTED says that we have to put a quote before the list that represents a doc string reference. `defvaralias', `autoload' and `custom-declare-variable' need that." - (when byte-native-compiling + (when (and byte-native-compiling name) ;; Spill bytecode output for the native compiler here (push (cons name (apply #'vector form)) byte-to-native-bytecode)) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 584a02af0e3..3f8482b5d02 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -408,7 +408,7 @@ Put PREFIX in front of it." ('defvar (cdr x)) ('defconst (cdr x)))) byte-to-native-top-level-forms))) - (cl-loop for (name . bytecode) in (remove-if-not #'car byte-to-native-bytecode) + (cl-loop for (name . bytecode) in byte-to-native-bytecode for lap = (alist-get name byte-to-native-lap) for lambda-list = (aref bytecode 0) for func = (make-comp-func :symbol-name name -- 2.39.5