radian-software / radian

🍉 Dotfiles that marry elegance and practicality.
MIT License
490 stars 47 forks source link

How do I add customizations with use-package or use-feature? #438

Closed smuething closed 5 years ago

smuething commented 5 years ago

I really like the basic setup of radian, but I'm kind of stuck when trying to apply my own customizations to it. I don't want to mess with radian.el, so I tried to do all my package loading etc. in init.local.el. That failed, but I figured out that the file gets loaded really early, before use-package is available.

So I tried adding my customizations to the radian-after-init-hook, but I still get errors about use-feature and use-package being undefined. I'm not really a Lisp guru, but do I have to somehow defer the evaluation of the hook until it gets called? I couldn't find any documentation or examples on how to do this...

raxod502 commented 5 years ago

This works for me:

(defun radian-local--after-init ()
  (use-package z3-mode)
  ...)

(add-hook 'radian-after-init-hook #'radian-local--after-init)

Does that example help?

smuething commented 5 years ago

Thanks, that solved it! I had put everything in a lambda and that somehow didn't work (and I don't know enough about Lisp to understand why...)