From d8479b8f727298124466b371f6b9bcfbeebec699 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sat, 12 May 2018 00:18:51 -0400 Subject: [PATCH] core: add optional append local paremeters to spacemacs/add-to-hooks --- core/core-funcs.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-funcs.el b/core/core-funcs.el index 2c07e4c09..c86361add 100644 --- a/core/core-funcs.el +++ b/core/core-funcs.el @@ -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."