[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoload cl-defstruct constructor?

From: Stephen Leake
Subject: Re: autoload cl-defstruct constructor?
Date: Mon, 09 Sep 2019 12:35:43 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Stephen Leake <address@hidden> writes:

> Now I have to figure out the minimum workaround for emacs 25, 26
> compatibility.

This is a problem.

The first thing I have to do is disable the autoload on the cl-defstruct,
because leaving it in makes the autoload file fail due to declaration
order violations. I don't see a way to do that short of actually editing
the file.

The autoload cookie is handled in autoload--print-cookie-text; it does a
simple '(search-forward generate-autoload-cookie)', so surrounding the
cookie with '(if (< emacs-major-version 27)' will not have the desired

The only workaround I can see for the ELPA package is to create a new
package ada-mode-1 that requires emacs < 27, and bump the emacs require
for ada-mode to 27. Then I can use sed or something to edit the source
files for the ada-mode-1 package.

Of course, ELPA doesn't support an upper limit on a require version.

Another way to handle this and similar issues in the future is to add a
"preprocess files" step to the package.el build process, which is
normally null.

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]