branch: externals/vc-hgcmd
commit 3f8c60b82a00cac1740c5dd21f0d4573cc368f34
Author: muffinmad <[email protected]>
Commit: muffinmad <[email protected]>
Create output buffer before actually running command
---
vc-hgcmd.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/vc-hgcmd.el b/vc-hgcmd.el
index d3ddb4c..03f7011 100644
--- a/vc-hgcmd.el
+++ b/vc-hgcmd.el
@@ -5,7 +5,7 @@
;; Author: Andrii Kolomoiets <[email protected]>
;; Keywords: vc
;; URL: https://github.com/muffinmad/emacs-vc-hgcmd
-;; Package-Version: 1.3.12
+;; Package-Version: 1.3.13
;; Package-Requires: ((emacs "25.1"))
;; This file is NOT part of GNU Emacs.
@@ -347,9 +347,10 @@ Insert output to process buffer and check if amount of
data is enought to parse
(when vc-hgcmd--current-command
(user-error "Hg command \"%s\" is active" (car
(vc-hgcmd--command-command vc-hgcmd--current-command))))
(when (process-live-p process)
- (let ((tty (process-tty-name process))
- (command (vc-hgcmd--command-command cmd))
- (output-buffer (vc-hgcmd--command-output-buffer cmd)))
+ (let* ((tty (process-tty-name process))
+ (command (vc-hgcmd--command-command cmd))
+ (output-buffer (or (vc-hgcmd--command-output-buffer cmd)
+ (setf (vc-hgcmd--command-output-buffer cmd)
(vc-hgcmd--output-buffer command)))))
(setq vc-hgcmd--current-command cmd)
(when (or (stringp output-buffer) (buffer-live-p output-buffer))
(with-current-buffer output-buffer
@@ -415,7 +416,6 @@ Insert output to process buffer and check if amount of data
is enought to parse
(vc-hgcmd--run-command
(make-vc-hgcmd--command
:command command
- :output-buffer (vc-hgcmd--output-buffer command)
:callback #'vc-hgcmd--update-callback
:callback-args (current-buffer))))