Use `add-hook' instead of `add-to-list'
`add-to-list' causes issues when used in conjunction with another hook. For example, in my config I add a hook using the standard `add-hook' function, which initializes (apparently) `gemini-mode-hook' with /just/ the function I add. Subsequent calls to `add-hook' convert the singleton to a list and add to it, but `add-to-list' throws an error because `gemini-mode-hook' isn't a list. Emacs ... eh?
This commit is contained in:
parent
fd76095f83
commit
fe0ac09a69
|
@ -90,7 +90,7 @@ PAGE is an Elpher page like `elpher-current-page'."
|
|||
(setq header-line-format (url-unhex-string (elpher-address-to-url address)))))
|
||||
(message "Use C-c C-c to save"))
|
||||
|
||||
(add-to-list 'gemini-mode-hook 'gemini-write-init)
|
||||
(add-hook 'gemini-mode-hook #'gemini-write-init)
|
||||
|
||||
(defun gemini-write-init ()
|
||||
"Add editing commands to `gemini-mode'."
|
||||
|
|
Loading…
Reference in New Issue