From: Philip Kaludercic <philipk@posteo.net>
To: Rudolf Schlatte <rudi@constantly.at>
Cc: help-gnu-emacs@gnu.org
Subject: Re: define-package, use-package and recipe: which ones?
Date: Sun, 01 Dec 2024 14:14:02 +0000 [thread overview]
Message-ID: <87frn7sd79.fsf@posteo.net> (raw)
In-Reply-To: <m1wmgjhie1.fsf@constantly.at> (Rudolf Schlatte's message of "Sun, 01 Dec 2024 10:17:26 +0100")
Rudolf Schlatte <rudi@constantly.at> writes:
> Marco Antoniotti <marcoxa@gmail.com> writes:
>
>> 2. what is `use-package` used for then?
>
> It's an alternative way for loading packages,
... and installing in a declarative way.
> replacing many forms with
> one. Its use is optional; some people like it. Instead of writing
> this:
>
> (add-to-list 'load-path "~/Source/foo-mode")
> (add-to-list 'auto-mode-alist '("\\.foo\\'" . foo-mode))
> (autoload #'foo-mode "foo-mode" nil t)
> (setq foo-extras t)
>
> you can write this:
>
> (use-package foo-mode
> :load-path "~/Source/foo-mode"
> :commands (foo-mode)
> :mode "\\.foo\\'"
Where it is worth pointing out that these fields are usually not
necessary any more, as well-written packages tend to have autoloads that
include adjustments to `load-path' and similar variables.
> :custom (foo-extras t))
next prev parent reply other threads:[~2024-12-01 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 8:43 define-package, use-package and recipe: which ones? Marco Antoniotti
2024-12-01 9:17 ` Rudolf Schlatte
2024-12-01 14:14 ` Philip Kaludercic [this message]
2024-12-03 13:44 ` Stefan Monnier via Users list for the GNU Emacs text editor
-- strict thread matches above, loose matches on Subject: below --
2024-11-30 6:49 Marco Antoniotti
2024-11-30 19:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
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=87frn7sd79.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=help-gnu-emacs@gnu.org \
--cc=rudi@constantly.at \
/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.
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).