unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: autoload cl-defstruct constructor?
Date: Mon, 09 Sep 2019 12:35:43 -0700	[thread overview]
Message-ID: <86woeh6z5c.fsf@stephe-leake.org> (raw)
In-Reply-To: <861rwp8err.fsf@stephe-leake.org> (Stephen Leake's message of "Mon, 09 Sep 2019 12:12:56 -0700")

Stephen Leake <stephen_leake@stephe-leake.org> 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
effect.

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	other threads:[~2019-09-09 19:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 18:53 autoload cl-defstruct constructor? Stephen Leake
2019-09-04 19:03 ` Stefan Monnier
2019-09-05 23:36   ` Stephen Leake
2019-09-06 12:47     ` Stefan Monnier
2019-09-06 22:25       ` Stephen Leake
2019-09-07 14:29         ` Stefan Monnier
2019-09-09 19:12           ` Stephen Leake
2019-09-09 19:35             ` Stephen Leake [this message]
2019-09-09 21:38             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86woeh6z5c.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).