…
The optional argument INITVALUE is evaluated, and used to set SYMBOL,
only if SYMBOL's value is void. If SYMBOL is buffer-local, its
default value is what is set; buffer-local values are not affected.
If INITVALUE is missing, SYMBOL's value is not set.
defvar SYMBOL &optional INITVALUE DOCSTRING)
… The optional argument INITVALUE is evaluated, and used to set SYMBOL, only if SYMBOL's value is void. If SYMBOL is buffer-local, its default value is what is set; buffer-local values are not affected. If INITVALUE is missing, SYMBOL's value is not set.