Subject: bug#76264: closed (Re: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 13 Feb 2025 15:45:02 +0000

Your bug report

#76264: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
76264: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76264
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files
From: Stefan Kangas <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: [email-masked]
Date: Thu, 13 Feb 2025 07:44:11 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Stefan Monnier <[email-masked]> writes:

>> I think we should install the following to start clearing up some of the
>> confusion.
>
> LGTM,

Thanks, pushed, closing.

Subject: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files
From: Stefan Kangas <[email-masked]>
To: [email-masked]
Cc: Philip Kaludercic <[email-masked]>, Stefan Monnier <[email-masked]>
Date: Thu, 13 Feb 2025 04:24:21 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Severity: wishlist

The *-pkg.el files are not source files that should be executed, but
Lisp data files.  This has been the source of much confusion.

For example, it is currently completely confused in the lispref manual,
which talks about `define-package' as a function, despite the fact that
it has never been working like that and is now obsolete.  (I'm working
on a patch.)

I think we should install the following to start clearing up some of the
confusion.

Thoughts?

diff --git a/elpa-admin.el b/elpa-admin.el
index c127f50dcc..2ccfe35f81 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1516,7 +1516,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
 	(print-length nil))
     (elpaa--temp-file pkg-file)
     (write-region
-     (concat (format ";; Generated package description from %s.el
-*- no-byte-compile: t -*-\n"
+     (concat (format ";; Generated package description from %s.el
-*- mode: lisp-data; no-byte-compile: t -*-\n"
 		     name)
 	     (prin1-to-string
               (pcase-let ((`(,version ,desc ,requires ,extras)