unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Rudolf Schlatte <rudi@constantly.at>
To: help-gnu-emacs@gnu.org
Subject: Re: define-package, use-package and recipe: which ones?
Date: Sun, 01 Dec 2024 10:17:26 +0100	[thread overview]
Message-ID: <m1wmgjhie1.fsf@constantly.at> (raw)
In-Reply-To: CAKmY7cUf56FcOcoPMmCKDe=N7vvGT+cA6GYRH_839bJRN2+vAA@mail.gmail.com

Marco Antoniotti <marcoxa@gmail.com> writes:

>    2. what is `use-package` used for then?

It's an alternative way for loading packages, 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\\'"
  :custom (foo-extras t))




  reply	other threads:[~2024-12-01  9:17 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 [this message]
2024-12-01 14:14   ` Philip Kaludercic
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=m1wmgjhie1.fsf@constantly.at \
    --to=rudi@constantly.at \
    --cc=help-gnu-emacs@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.
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).