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

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

[elpa] externals/vc-hgcmd 3f8c60b 45/87: Create output buffer before act


From: Stefan Monnier
Subject: [elpa] externals/vc-hgcmd 3f8c60b 45/87: Create output buffer before actually running command
Date: Sat, 5 Jun 2021 16:11:43 -0400 (EDT)

branch: externals/vc-hgcmd
commit 3f8c60b82a00cac1740c5dd21f0d4573cc368f34
Author: muffinmad <andreyk.mad@gmail.com>
Commit: muffinmad <andreyk.mad@gmail.com>

    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 <andreyk.mad@gmail.com>
 ;; 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))))
 



reply via email to

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