Skip to content

Commit 9ae258d

Browse files
committed
Make the diff processes not query on Emacs' exit
1 parent f61c3ec commit 9ae258d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

diff-hl.el

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,14 +705,23 @@ Return a list of line overlays used."
705705
(overlay-put h 'insert-behind-hooks hook)))))))
706706
(nreverse ovls)))
707707

708+
(defun diff-hl--no-query-on-exit (value)
709+
(when-let* ((buf (and (stringp value) (get-buffer value)))
710+
(proc (get-buffer-process buf)))
711+
(set-process-query-on-exit-flag proc nil)))
712+
708713
(defun diff-hl--update ()
709714
(let* ((orig (current-buffer))
710-
(cc (diff-hl-changes)))
715+
(cc (diff-hl-changes))
716+
(working (assoc-default :working cc))
717+
(reference (assoc-default :reference cc)))
718+
(diff-hl--no-query-on-exit working)
719+
(diff-hl--no-query-on-exit reference)
711720
(diff-hl--resolve
712-
(assoc-default :working cc)
721+
working
713722
(lambda (changes)
714723
(diff-hl--resolve
715-
(assoc-default :reference cc)
724+
reference
716725
(lambda (ref-changes)
717726
(let ((ref-changes (diff-hl-adjust-changes ref-changes changes))
718727
reuse)

0 commit comments

Comments
 (0)