emacs-devel
[Top][All Lists]
Advanced

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

Re: "Emacs Lisp Packages" chapter in the Emacs manual


From: Stefan Monnier
Subject: Re: "Emacs Lisp Packages" chapter in the Emacs manual
Date: Mon, 11 May 2020 23:21:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> [ The first step is of course to make sure the file is found from
>>  `load-path`.  ]
>
> Like ask the user to manually do M-x load-library and see the result ?

Traditionally it was done either by telling the user to

    put this file somewhere in your `load-path`

or to

    (add-to-list 'load-path "/where/ever/you/put/that/file/")

> Well, actually all this started because I wanted to install Drew's
> help-fns+.el and it happens that Drew uses "require".

Then follow Drew's suggestion, since that's how he designed his library.

> So, in case I want to add a similar feature set, would 'require be too much ?

I know nothing about help-fns+ so I can't answer that.
But nowadays libraries should be designed for the case where they're
installed by a tool like package.el and in such a case, the user should
almost never need to `require` the package.

> Would (autoload 'help-fns+) be sufficient ?

`autoload` takes 2 args, the first being a function name and the second
the file in which that function is to be found.

> Keep in mind that this addition is for users who know a minimal subset of
> Emacs lisp (enough to play with their init file), not for authors.

Those users should *never* need to do that: either they install via
something like package.el or they follow steps in the package's
installation instructions.


        Stefan




reply via email to

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