branch: externals/diff-hl
commit 9ae258d0ef73a70704a1072acbbcfd4a69e0f102
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Make the diff processes not query on Emacs' exit
---
diff-hl.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/diff-hl.el b/diff-hl.el
index 60a5f334d4..5915ae1823 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -705,14 +705,23 @@ Return a list of line overlays used."
(overlay-put h 'insert-behind-hooks hook)))))))
(nreverse ovls)))
+(defun diff-hl--no-query-on-exit (value)
+ (when-let* ((buf (and (stringp value) (get-buffer value)))
+ (proc (get-buffer-process buf)))
+ (set-process-query-on-exit-flag proc nil)))
+
(defun diff-hl--update ()
(let* ((orig (current-buffer))
- (cc (diff-hl-changes)))
+ (cc (diff-hl-changes))
+ (working (assoc-default :working cc))
+ (reference (assoc-default :reference cc)))
+ (diff-hl--no-query-on-exit working)
+ (diff-hl--no-query-on-exit reference)
(diff-hl--resolve
- (assoc-default :working cc)
+ working
(lambda (changes)
(diff-hl--resolve
- (assoc-default :reference cc)
+ reference
(lambda (ref-changes)
(let ((ref-changes (diff-hl-adjust-changes ref-changes changes))
reuse)