all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* difference between setq and setq-local
@ 2021-09-27  3:03 Pankaj Jangid
  2021-09-27  3:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 3+ messages in thread
From: Pankaj Jangid @ 2021-09-27  3:03 UTC (permalink / raw)
  To: Emacs Help

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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-28  3:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-27  3:03 difference between setq and setq-local Pankaj Jangid
2021-09-27  3:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28  3:02   ` Pankaj Jangid

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.