Skip to content

Commit

Permalink
fix for startup/shutdown hooks not getting run correctly
Browse files Browse the repository at this point in the history
I broke project startup/shutdown hooks by getting rid of project vars,
turns out run-hooks needs a symbol and can't just use a list of function
symbols as argument

so now instead of run-hooks I just mapc funcall on the list
  • Loading branch information
rakete committed Sep 14, 2012
1 parent 8fb1c10 commit 697b860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mk-project.el
Expand Up @@ -1519,7 +1519,7 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
(when (mk-proj-get-config-val 'startup-hook)
(if (functionp (mk-proj-get-config-val 'startup-hook))
(funcall (mk-proj-get-config-val 'startup-hook))
(run-hooks (mk-proj-get-config-val 'startup-hook))))
(mapc 'funcall (mk-proj-get-config-val 'startup-hook))))
(run-hooks 'mk-proj-before-files-load-hook)
(mk-proj-visit-saved-open-files)
(mk-proj-visit-saved-open-friends)
Expand Down Expand Up @@ -1579,7 +1579,7 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
(when (mk-proj-get-config-val 'shutdown-hook)
(if (functionp (mk-proj-get-config-val 'shutdown-hook))
(funcall (mk-proj-get-config-val 'shutdown-hook))
(run-hooks (mk-proj-get-config-val 'shutdown-hook))))
(mapc 'funcall (mk-proj-get-config-val 'shutdown-hook))))
(run-hooks 'mk-proj-project-unload-hook)
(run-hooks 'mk-proj-after-unload-hook))
(error nil)))
Expand Down

0 comments on commit 697b860

Please sign in to comment.