emacs-devel
[Top][All Lists]
Advanced

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

Re: development practices for ELPA packages


From: Stefan Monnier
Subject: Re: development practices for ELPA packages
Date: Fri, 20 Nov 2020 10:22:48 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Right now I'm working on the next release of rt-liberation. I would like
>> to tell Emacs: "load all of the ELPA packages normally, but when you get
>> to rt-liberation please load my local, non-packaged, version from
>> /devel/rt-liberation"
> Stefan's suggestion works if your devel directory looks like an
> installed package. ada-mode doesn't;

Making it look like an installed package is easy: it just requires
a <PKG>-pkg.el and <PKG>-autoloads.el file.

elpa.git has code to create&refresh those files.  It's not currently
very convenient to use that code in a specific directory, but that would
be easy to fix.

The creation of <PKG>-autoloads.el is done by the following rule in the
GNUmakefile:

    %-autoloads.el:
        @#echo 'Generating autoloads for $@'
        @cd $(dir $@) &&                                                   \
          $(EMACS) -l $(CURDIR)/admin/archive-contents.el                  \
              --eval "(require 'package)"                                  \
              --eval "(load (expand-file-name \"../names/names-autoloads.el\") 
t t)" \
              --eval "(package-generate-autoloads \"$$(basename $$(pwd))\" \
                                                  \"$$(pwd)\")"

and the rule for <PKG>-pkg.el is:

    %-pkg.el: %.el
        @echo 'Generating description file $@'
        @$(EMACS) \
            --eval '(require (quote package))' \
            --eval '(setq b (find-file-noselect "$<"))' \
            --eval '(setq d (with-current-buffer b (package-buffer-info)))' \
            --eval '(package-generate-description-file d "$@")'


-- Stefan




reply via email to

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