[Top][All Lists]

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

Re: Wrapping an Emacs dynamic module in a package

From: Joris Vankerschaver
Subject: Re: Wrapping an Emacs dynamic module in a package
Date: Mon, 17 Oct 2016 09:34:25 +0100

Hi Eli,

Sorry, I should have been more specific. Here's what I did:

1) I wrote an emacs module, as well as wrappers mymod.el (with
some local setup) and mymod-pkg.el (which only has a call to

2) I tarred these together to form mymod-0.1.tar

3) I installed the resulting package using M-x package-install-file

In my messages buffer, I see that Emacs tries to generate autoloads for the
.so, and fails with the error indicated in the original email ("
error: scan-error: (Containing expression ends prematurely 238020

I'm pretty confident that the emacs module is correctly built (I can load
it, and run the functions in it). Also, if I rename to something
else, e.g. _mymod.blablabla, the rest of the package installs correctly and
can be loaded. So it really seems as if Emacs is choking on trying to
generate autoloads for

Maybe backtracking a little bit:

1) Should Emacs be able to generate autoloads for an .so?

2) Does anybody have any experience with embedding an emacs module in an
emacs package? Any best practices I should be aware of?


On Mon, Oct 17, 2016 at 6:51 AM, Eli Zaretskii <> wrote:

> > From: Joris Vankerschaver <>
> > Date: Sun, 16 Oct 2016 18:37:54 +0100
> >
> > I have an emacs dynamic module that I would like install as part of a
> > multi-file package. That is, I have a shared object file, and
> > some Elisp wrappers mymod-pkg.el and mymod.el that do various bits of
> > initialization.
> >
> > When Emacs installs my package, things go wrong when generating the
> > autoloads for I get a
> >
> >   (error " error: scan-error: (Containing expression ends
> > prematurely 238020 238021))
> >
> > This happens during autoload-generate-file-autoloads for
> What do you mean by "Emacs installs", and why does that cause Emacs to
> try to generate autoloads for

reply via email to

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