emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor 87c96b3 091/140: with-editor-finish: Preserve


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor 87c96b3 091/140: with-editor-finish: Preserve local git-commit-post-finish-hook
Date: Fri, 6 Aug 2021 12:51:26 -0400 (EDT)

branch: elpa/with-editor
commit 87c96b3a7cdf9ab9477e27f1ae2010883a83a426
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    with-editor-finish: Preserve local git-commit-post-finish-hook
---
 with-editor.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/with-editor.el b/with-editor.el
index e5445b1..80929d5 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -332,6 +332,7 @@ And some tools that do not handle $EDITOR properly also 
break."
   (when (run-hook-with-args-until-failure
          'with-editor-finish-query-functions force)
     (let ((post-finish-hook with-editor-post-finish-hook)
+          (post-commit-hook (bound-and-true-p git-commit-post-finish-hook))
           (dir default-directory))
       (run-hooks 'with-editor-pre-finish-hook)
       (with-editor-return nil)
@@ -339,6 +340,8 @@ 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)
+          (setq-local git-commit-post-finish-hook post-commit-hook))
         (run-hooks 'with-editor-post-finish-hook)))))
 
 (defun with-editor-cancel (force)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]