Subject: bug#16222: Installing ELPA packages complains about :keywords in define-package

From: Ted Zlatanov <[email-masked]>
Date: Tue, 24 Dec 2013 10:23:04 -0500

On Tue, 24 Dec 2013 09:55:00 -0500 Stefan Monnier <[email-masked]> wrote: 

>>>> Stefan: I think the problem is `package--alist-to-plist'.  The generated
>>>> PACKAGE-pkg.el has, for example:
SM> No, the problem is that *-pkg.el should not be compiled (it's not
SM> "load"ed either): it's a file using the Elisp `sexp' syntax, but it's
SM> not a file written in Elisp.
>> OK, is it fixable?

SM> Of course: get the byte-compiler to skip those files.

1) Why is *-pkg.el written in this bizarro syntax and not something that
compiles cleanly?  IOW if it's going to be pure data, why pretend it's a
funcall?  I'd rather rename it to *-pkg.data or something and eliminate
any chance of this problem recurring.  The .el extension is wrong,
either way.

2) If you'd rather keep it as a confusingly-almost-ELisp file, can the
problem be solved by ";; no-byte-compile: t" in the local variables, or
does this function have to be changed?

#+begin_src lisp
(defun package--compile (pkg-desc)
  "Byte-compile installed package PKG-DESC."
  (package-activate-1 pkg-desc)
  (byte-recompile-directory (package-desc-dir pkg-desc) 0 t))
#+end_src

Thanks
Ted