docs(emacs-lisp): remove sharp-quoted example for add-hook!

add-hook! is advertised to be able to add multiple hooks using a
function-quoted list of functions, but add-hook! never actually
supported this. Rather than correct the implementation, I'm correcting
the documentation instead, because sharp-quoting lists betrays the
semantics of the sharp-quote. Quoted lists should still work fine
though (as documented in add-hook!'s docstring).

Close: #5843
This commit is contained in:
Henrik Lissner 2022-04-03 14:48:22 +02:00
parent 7ada538991
commit e8c22c770b
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -44,7 +44,7 @@ usage from their documentation (e.g. =SPC h f add-hook\!=).
;; Adding many-to-many functions to hooks ;; Adding many-to-many functions to hooks
(add-hook! some-mode #'enable-something #'and-another) (add-hook! some-mode #'enable-something #'and-another)
(add-hook! some-mode #'(enable-something and-another)) (add-hook! some-mode '(enable-something and-another))
(add-hook! '(one-mode-hook second-mode-hook) #'enable-something) (add-hook! '(one-mode-hook second-mode-hook) #'enable-something)
(add-hook! (one-mode second-mode) #'enable-something) (add-hook! (one-mode second-mode) #'enable-something)