> I think you may misunderstand: setq always sets a global variable.
Since when?
-- Macro: setq-local variable value
This macro creates a buffer-local binding in the current buffer for
VARIABLE, and gives it the buffer-local value VALUE. It is
equivalent to calling `make-local-variable' followed by `setq'.
VARIABLE should be an unquoted symbol.
Note the last sentence, which points out that `setq' does not always
set a global variable. If it did, then so would `setq-local',
according to that text.