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

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

[elpa] master dcf4957 123/272: counsel.el (counsel--async-command): Add


From: Oleh Krehel
Subject: [elpa] master dcf4957 123/272: counsel.el (counsel--async-command): Add sentinel and filter args
Date: Mon, 25 Apr 2016 10:13:20 +0000

branch: master
commit dcf495781da5ff50539af386ba24cf7ccc84336c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel--async-command): Add sentinel and filter args
    
    Re #394
---
 counsel.el |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index 53c3170..258ecbf 100644
--- a/counsel.el
+++ b/counsel.el
@@ -66,7 +66,7 @@
   "Store the time when a new process was started.
 Or the time of the last minibuffer update.")
 
-(defun counsel--async-command (cmd)
+(defun counsel--async-command (cmd &optional process-sentinel process-filter)
   (let* ((counsel--process " *counsel*")
          (proc (get-process counsel--process))
          (buff (get-buffer counsel--process)))
@@ -79,8 +79,8 @@ Or the time of the last minibuffer update.")
                 counsel--process
                 cmd))
     (setq counsel--async-time (current-time))
-    (set-process-sentinel proc #'counsel--async-sentinel)
-    (set-process-filter proc #'counsel--async-filter)))
+    (set-process-sentinel proc (or process-sentinel #'counsel--async-sentinel))
+    (set-process-filter proc (or process-filter #'counsel--async-filter))))
 
 (defun counsel--async-sentinel (process event)
   (if (string= event "finished\n")



reply via email to

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