]> git.eshelyaron.com Git - emacs.git/commitdiff
add defconst support
authorAndrea Corallo <akrl@sdf.org>
Sun, 8 Sep 2019 15:13:48 +0000 (17:13 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:45 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index c5c36e9eda8e4fe19e0fb8fb6947d679e3ec8030..12c8ca63699449dafbff33333a90488c1ccb32dd 100644 (file)
@@ -283,9 +283,9 @@ Put PREFIX in front of it."
   (byte-compile-file filename)
   (setf (comp-ctxt-top-level-defvars comp-ctxt)
         (reverse (mapcar (lambda (x)
-                           (if (eq (car x) 'defvar)
-                               (cdr x)
-                             (cl-assert nil)))
+                           (ecase (car x)
+                             ('defvar (cdr x))
+                             ('defconst (cdr x))))
                          byte-to-native-top-level-forms)))
   (cl-loop for (name lap bytecode) in byte-to-native-output
            for lambda-list = (aref bytecode 0)