I can use setq-default
to set a symbol's default value, as follows:
(with-temp-buffer
(make-local-variable 'bar)
(setq-default bar "xyz")
(symbol-value 'bar))
When I first executed the above code, I got an error:
Symbol’s value as variable is void: bar
But when I tried executing it again, I got the expected return value: "xyz".
Why did I got an error the first time but succeeded the second time?