When diff-hl.el is being loaded, and this defcustom is being defined, it is possible the setter will encounter a variable global-diff-hl-mode that is both bound and true, maybe due to a customs file with a (custom-set-variable '(global-diff-hl-mode t)) in it being loaded before diff-hl.el. Therefore, during this defcustom definition, the default initializer will call the setter, which will attempt to call an autoloaded function global-diff-hl-mode, which will trigger another load of diff-hl.el, ad infinitum.
This PR uses the suggested fix in the elisp manual to only call the setter during customization.
When
diff-hl.el
is being loaded, and this defcustom is being defined, it is possible the setter will encounter a variableglobal-diff-hl-mode
that is both bound and true, maybe due to a customs file with a(custom-set-variable '(global-diff-hl-mode t))
in it being loaded beforediff-hl.el
. Therefore, during this defcustom definition, the default initializer will call the setter, which will attempt to call an autoloaded functionglobal-diff-hl-mode
, which will trigger another load ofdiff-hl.el
, ad infinitum.This PR uses the suggested fix in the elisp manual to only call the setter during customization.