]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cconv.el (cconv-convert): Fix compiling compiled code
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 2 Feb 2018 15:28:34 +0000 (10:28 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 2 Feb 2018 15:28:34 +0000 (10:28 -0500)
Don't conv-convert the docstring arg of defvar/defconst.

lisp/emacs-lisp/cconv.el

index 02fe794467b9baaabd08403d32b4e339e2bc6789..ca46dbb7b558be62dfca8e7c7be70d309ed86b15 100644 (file)
@@ -449,8 +449,11 @@ places where they originally did not directly appear."
                                        ;defconst, defvar
     (`(,(and sym (or `defconst `defvar)) ,definedsymbol . ,forms)
      `(,sym ,definedsymbol
-            . ,(mapcar (lambda (form) (cconv-convert form env extend))
-                       forms)))
+            . ,(when (consp forms)
+                 (cons (cconv-convert (car forms) env extend)
+                       ;; The rest (i.e. docstring, of any) is not evaluated,
+                       ;; and may be an invalid expression (e.g. ($# . 678)).
+                       (cdr forms)))))
 
                                        ;condition-case
     ((and `(condition-case ,var ,protected-form . ,handlers)