core: add optional append local paremeters to spacemacs/add-to-hooks

This commit is contained in:
syl20bnr 2018-05-12 00:18:51 -04:00
parent 8081d51560
commit d8479b8f72
1 changed files with 2 additions and 2 deletions

View File

@ -272,10 +272,10 @@ buffer."
finally return count))
;; from https://github.com/cofi/dotfiles/blob/master/emacs.d/config/cofi-util.el#L38
(defun spacemacs/add-to-hooks (fun hooks)
(defun spacemacs/add-to-hooks (fun hooks &optional append local)
"Add function to hooks"
(dolist (hook hooks)
(add-hook hook fun)))
(add-hook hook fun append local)))
(defun spacemacs/add-all-to-hook (hook &rest funs)
"Add functions to hook."