Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Reset all buffer variables to default in Emacs
Question
How do you clear local variable customizations in buffer? In other words, how do you reset all variables to default?
Use case
This may be useful in instances where you M-x customize-variable
and want to force those changes to persist on an open buffer.
If I have edited a .c
file with c-basic-offset
set to 2
, then M-x customize-variable
and change it to 4
, new files will have an offset of 4
, but existing files will maintain an offset of 2
.
Notes
Using spacemacs.
1 answer
M-x kill-local-variable
RET
c-basic-offset
seems to work, but only temporarily. If I save, and close Emacs, and revisit the file, the changes do not persist.
I that in an affected directory, each file must be visited and a permanent version of this must be performed. Not ideal.
0 comment threads