Closed grolongo closed 1 year ago
Hi, for a long time I put all my
(defun...
under the:preface
macro. Never had an issue so far.
Great!
Now I found there are
:functions
and:defines
macros.Should I set everything like this?:
all
(defvar...
under:defines
all(defun...
under:functions
No, I think you should leave them under the :preface
macro. Use :defines
and :functions
only if you need to silence byte-compiler warnings.
But what about
defadvice
anddefine-minor-mode
? Those works if I add them either in:preface
or:config
, but I'm looking for the use-package conventional way.
The difference is that :preface
is evaluated immediately, and :config
is evaluated after the package has been loaded. Use whichever works for you. You can test this with the M-x pp-macroexpand-last-sexp
command.
I hope that answers your questions, so I'm closing this issue.
Hi, for a long time I put all my
(defun...
under the:preface
macro. Never had an issue so far.Now I found there are
:functions
and:defines
macros.Should I set everything like this?:
all
(defvar...
under:defines
all(defun...
under:functions
But what about
defadvice
anddefine-minor-mode
? Those works if I add them either in:preface
or:config
, but I'm looking for the use-package conventional way.