unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [Question] use-package's :init or :config for enabling modes
@ 2024-05-19 17:38 Rodrigo Morales
  2024-05-19 18:11 ` tomas
  2024-05-19 19:15 ` Ergus
  0 siblings, 2 replies; 9+ messages in thread
From: Rodrigo Morales @ 2024-05-19 17:38 UTC (permalink / raw)
  To: help-gnu-emacs


I emptied =~/.config/emacs/init.el= file and I inserted the following sexp and launched Emacs. =vertico-mode= was enabled.

#+BEGIN_SRC elisp
(use-package vertico

  :config (vertico-mode))
#+END_SRC

I emptied =~/.config/emacs/init.el= again and I inserted the following sexp and launched Emacs. =vertico-mode= was enabled.

#+BEGIN_SRC elisp
(use-package vertico

  :init (vertico-mode))
#+END_SRC

As shown above, whether we use =:init= or =:config= both can be used for enabling a mode. So my question is: What's the difference between using =:config= and =:init= for enabling a mode that is defined by a package.

* System information

GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-23  4:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-19 17:38 [Question] use-package's :init or :config for enabling modes Rodrigo Morales
2024-05-19 18:11 ` tomas
2024-05-20  3:56   ` Rodrigo Morales
2024-05-20  5:34     ` tomas
2024-05-19 19:15 ` Ergus
2024-05-20  4:03   ` Rodrigo Morales
2024-05-20  5:37   ` tomas
2024-05-22 21:15     ` Ergus
2024-05-23  4:32       ` tomas

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).