fix(vc-gutter): check 'diff-hl-disable-on-remote is bound

This fixes the following error message on startup:

    Symbol’s value as variable is void: diff-hl-disable-on-remote
This commit is contained in:
Dan McArdle 2024-07-26 15:22:56 -04:00 committed by Henrik Lissner
parent dec2a387ad
commit ff3fd15b02

View file

@ -69,7 +69,7 @@
(defun +vc-gutter-enable-maybe-h () (defun +vc-gutter-enable-maybe-h ()
"Conditionally enable `diff-hl-dired-mode' in dired buffers. "Conditionally enable `diff-hl-dired-mode' in dired buffers.
Respects `diff-hl-disable-on-remote'." Respects `diff-hl-disable-on-remote'."
(unless (and diff-hl-disable-on-remote (unless (and (bound-and-true-p diff-hl-disable-on-remote)
(file-remote-p default-directory)) (file-remote-p default-directory))
(diff-hl-dired-mode +1)))) (diff-hl-dired-mode +1))))