help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

difference between setq and setq-local


From: Pankaj Jangid
Subject: difference between setq and setq-local
Date: Mon, 27 Sep 2021 08:33:20 +0530

There are three variants of setq; namely - setq, setq-local,
setq-default. Meaning of setq-local and setq-default is clear from the
docstring. i.e. changes made by setq-local are not visible outside the
current buffer. And changes made by setq-default are visible in all the
buffers in which the value is not set (overridden).

What about plain setq? My assumption is that these changes are visible
in all the buffers if not overridden by setq-local. In this case setq
acts like setq-default. Or is it the opposite? i.e. setq overrides
setq-default valuep; in which case it acts like setq-local.

What am I missing? In which scenarios the three functions behave
differently from each other?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]