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

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 13 Feb 2025 12:25:01 UTC

Severity: wishlist

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: [GNU ELPA] Use lisp-data-mode in generated *-pkg.el files
Date: Fri, 14 Feb 2025 15:45:54 +0000
Stefan Kangas <stefankangas <at> gmail.com> writes:

> 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 do think that it used to be a function, but that was changed a number
of years ago.

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

The only negative to this patch is that users on Emacs 27 or before will
get a warning about an invalid mode, but otherwise I think that this is
a good idea.

> 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)





This bug report was last modified 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.