bug#81643: 32.0.50; use-package :hook is not the same as :init add-hook
John Wiegley <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
>>>>> Björn Lindqvist <[email protected]> writes: > I think the problem is with the first two examples in section 4.3. > Specifically: > :init (add-hook 'c-ts-mode-hook #'my/c-ts-mode-hook) > cannot be simplified to: > :hook (c-ts-mode . my/c-ts-mode-hook) > It must be: > :hook ('c-ts-mode . #'my/c-ts-mode-hook) Why is this, exactly? And `('c-ts-mode . #'my/c-ts-mode-hook)' seems very wrong. > I think the documentation is very confusing. For example: > (use-package company > :commands company-mode > :init > (add-hook 'prog-mode-hook #'company-mode)) > Why is the hook function named company-mode? Because that the name of the function used to turn on company-mode. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2