summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2019-12-22 20:39:23 +0100
committerJonas Bernoulli <jonas@bernoul.li>2019-12-22 20:39:23 +0100
commitba4ca8ab34c17fbc4c7af5b9b42c6d3836b48e1a (patch)
treeb373921dbbc03333e45f06f751af8fe7a872c965
parent814777ce8ad42ad115eebc38743c55b99af5d2e7 (diff)
with-editor-finish: Fix bug concerning git-commit-post-finish-hook
`git-commit-post-finish-hook' is intended to be set locally. Because the buffer in which it is locally does not exist anymore by the time we have reached the "post finish" time, we use a temporary buffer and carry over the value from the other buffer. However we accidentally only copied the value of the hook variable if it already non-nil locally in the temporary buffer (which should not be the case) or non-nil globally (which might very well not be the case. Closes #68.
-rw-r--r--with-editor.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/with-editor.el b/with-editor.el
index a35b6f8..19198da 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -343,7 +343,7 @@ And some tools that do not handle $EDITOR properly also break."
(with-temp-buffer
(setq default-directory dir)
(setq-local with-editor-post-finish-hook post-finish-hook)
- (when (bound-and-true-p git-commit-post-finish-hook)
+ (when post-commit-hook
(setq-local git-commit-post-finish-hook post-commit-hook))
(run-hooks 'with-editor-post-finish-hook)))))