If you try to make one of these variables buffer-local, you'll get an error message. The global value of the variable henceforth is in effect in this buffer. Setting the major mode kills all the local variables of the buffer except for a few variables specially marked as permanent locals . To set the global value of a variable, regardless of whether the variable has a local value in the current buffer, you can use the Lisp construct setq-default . When the current buffer does have a local value, the new global value may not be visible until you switch to another buffer.
Lisp programs can use default-value to look at a variable's default value.
This function takes a symbol as argument and returns its default value.