summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Vanicat <vanicat@debian.org>2019-01-02 14:57:36 +0100
committerRémi Vanicat <vanicat@debian.org>2019-01-02 14:57:36 +0100
commit0290c5e258ab4dfa98a885f73a4611c4e472458f (patch)
treeeb57b92ac3c1e250b57bec28cf9af669d47790b5
parent9bed00be96c93a7280d5f18efc47d378994e26cc (diff)
parentd2299c9f380491589074f98bbee01e8d6e17a6ad (diff)
Update upstream source from tag 'upstream/2.8.1'
Update to upstream version '2.8.1' with Debian dir b8354e907e71637bae6ce51cd9d03d8b53ddb8cb
-rw-r--r--with-editor.el21
-rw-r--r--with-editor.org11
-rw-r--r--with-editor.texi11
3 files changed, 23 insertions, 20 deletions
diff --git a/with-editor.el b/with-editor.el
index bf79dd6..80929d5 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -331,14 +331,18 @@ And some tools that do not handle $EDITOR properly also break."
(interactive "P")
(when (run-hook-with-args-until-failure
'with-editor-finish-query-functions force)
- (let ((with-editor-post-finish-hook-1
- (ignore-errors (delq t with-editor-post-finish-hook)))
+ (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)
(accept-process-output nil 0.1)
- (let ((default-directory dir))
- (run-hooks 'with-editor-post-finish-hook-1)))))
+ (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)
"Cancel the current edit session."
@@ -348,15 +352,16 @@ And some tools that do not handle $EDITOR properly also break."
(let ((message with-editor-cancel-message))
(when (functionp message)
(setq message (funcall message)))
- (let ((with-editor-post-cancel-hook-1
- (ignore-errors (delq t with-editor-post-cancel-hook)))
+ (let ((post-cancel-hook with-editor-post-cancel-hook)
(with-editor-cancel-alist nil)
(dir default-directory))
(run-hooks 'with-editor-pre-cancel-hook)
(with-editor-return t)
(accept-process-output nil 0.1)
- (let ((default-directory dir))
- (run-hooks 'with-editor-post-cancel-hook-1)))
+ (with-temp-buffer
+ (setq default-directory dir)
+ (setq-local with-editor-post-cancel-hook post-cancel-hook)
+ (run-hooks 'with-editor-post-cancel-hook)))
(message (or message "Canceled by user")))))
(defun with-editor-return (cancel)
diff --git a/with-editor.org b/with-editor.org
index 4066aba..443a615 100644
--- a/with-editor.org
+++ b/with-editor.org
@@ -8,7 +8,7 @@
#+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: With-Editor: (with-editor).
#+TEXINFO_DIR_DESC: Using the Emacsclient as $EDITOR
-#+SUBTITLE: for version 2.8.0
+#+SUBTITLE: for version 2.8.0 (v2.8.0-2-g87c96b3+1)
#+BIND: ox-texinfo+-before-export-hook ox-texinfo+-update-version-strings
#+TEXINFO_DEFFN: t
@@ -30,7 +30,7 @@ additional functionality which makes it useful even for end-users, who
don't use Magit or another package which uses it internally.
#+TEXINFO: @noindent
-This manual is for With-Editor version 2.8.0.
+This manual is for With-Editor version 2.8.0 (v2.8.0-2-g87c96b3+1).
#+BEGIN_QUOTE
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@bernoul.li>
@@ -169,10 +169,9 @@ prompt for an alternative environment variable such as ~$GIT_EDITOR~.
- Command: with-editor-shell-command
- This command is like ~async-shell-command~, but it runs the shell
- command with the current Emacs instance exported as ~$EDITOR~. This
- only has an effect if the shell command is run asynchronously,
- i.e. when the command ends with ~&~.
+ This command is like ~shell-command~, but if the shell command ends
+ with ~&~ and is therefore run asynchronously, then the current Emacs
+ instance is exported as ~$EDITOR~.
To always use these variants add this to you init file:
diff --git a/with-editor.texi b/with-editor.texi
index 452c14d..8c9462c 100644
--- a/with-editor.texi
+++ b/with-editor.texi
@@ -31,7 +31,7 @@ General Public License for more details.
@finalout
@titlepage
@title With-Editor User Manual
-@subtitle for version 2.8.0
+@subtitle for version 2.8.0 (v2.8.0-2-g87c96b3+1)
@author Jonas Bernoulli
@page
@vskip 0pt plus 1filll
@@ -60,7 +60,7 @@ additional functionality which makes it useful even for end-users, who
don't use Magit or another package which uses it internally.
@noindent
-This manual is for With-Editor version 2.8.0.
+This manual is for With-Editor version 2.8.0 (v2.8.0-2-g87c96b3+1).
@quotation
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@@bernoul.li>
@@ -231,10 +231,9 @@ command with the current Emacs instance exported as @code{$EDITOR}.
@cindex with-editor-shell-command
@deffn Command with-editor-shell-command
-This command is like @code{async-shell-command}, but it runs the shell
-command with the current Emacs instance exported as @code{$EDITOR}. This
-only has an effect if the shell command is run asynchronously,
-i.e. when the command ends with @code{&}.
+This command is like @code{shell-command}, but if the shell command ends
+with @code{&} and is therefore run asynchronously, then the current Emacs
+instance is exported as @code{$EDITOR}.
@end deffn
To always use these variants add this to you init file: