@@ -401,13 +401,10 @@ string `"%PDF"`.
401401
402402## Hooks
403403
404- The ` :hook ` keyword allows adding functions onto package hooks. Thus,
405- all of the following are equivalent:
404+ The ` :hook ` keyword allows adding functions onto package hooks. The
405+ following are equivalent:
406406
407407``` elisp
408- (use-package company
409- :hook prog-mode)
410-
411408(use-package company
412409 :hook (prog-mode . company-mode))
413410
@@ -417,29 +414,35 @@ all of the following are equivalent:
417414 (add-hook 'prog-mode-hook #'company-mode))
418415```
419416
420- And likewise, when multiple hooks should be applied, the following are also
421- equivalent:
417+ And likewise, when multiple hooks should be applied, all of the
418+ following are also equivalent:
422419
423420``` elisp
424- (use-package company
425- :hook (prog-mode text-mode))
426-
427421(use-package company
428422 :hook ((prog-mode text-mode) . company-mode))
429423
430424(use-package company
431425 :hook ((prog-mode . company-mode)
432426 (text-mode . company-mode)))
433427
428+ (use-package company
429+ :hook (prog-mode . company-mode)
430+ :hook (text-mode . company-mode))
431+
432+ (use-package company
433+ :hook
434+ (prog-mode . company-mode)
435+ (text-mode . company-mode))
436+
434437(use-package company
435438 :commands company-mode
436439 :init
437440 (add-hook 'prog-mode-hook #'company-mode)
438441 (add-hook 'text-mode-hook #'company-mode))
439442```
440443
441- When using ` :hook ` omit the "-hook" suffix if you specify the hook
442- explicitly, as this is appended by default. For example the following
444+ When using ` :hook ` , omit the "-hook" suffix if you specify the hook
445+ explicitly, as this is appended by default. For example, the following
443446code will not work as it attempts to add to the ` prog-mode-hook-hook `
444447which does not exist:
445448
0 commit comments