minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.15k stars 43 forks source link

Why `:custom`? #312

Closed tonijarjour closed 1 year ago

tonijarjour commented 1 year ago

Hello, I'm wondering why you have :custom to set corfu's variables in the readme.

(use-package corfu
  :custom
  (corfu-auto t))

Implies

(custom-set-variables '(corfu-auto t))

Which is contrary to the auto generated comments:

  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
minad commented 1 year ago

Please take a look at the use-package documentation. :custom, :init and :config are documented there.

tonijarjour commented 1 year ago

Well, you didn't actually answer my issue. I know how they work. You could have set the variables with setq. Why do you specifically choose not to?

minad commented 1 year ago

Well, you didn't actually answer my issue.

It is not an issue about Corfu. Actually I don't use use-package in my configuration anymore. As far as I know :custom is the current best practice, since it works for all defcustoms, even the ones with a :set function.