Post #351091
2026-02-21 13:07 UTC
@screwlisp@gamerplus.org I have been investigating it myself a bit more, and though I am still not completely sure how Emacs is doing it, I think the problem is that (set-default 'var-name ...) is probably looking-up symbols among the set of buffer locals first, then the stack, then the top-level, but (eval 'var-name) or (setq var-name ...) looks-up in the order of stack, buffer-locals, top-level.
I understand that Emacs buffers act as a sort of “environment,” or maybe an instance of a “module,” and that buffer-locals are sort-of like protected variables from object oriented languages
Replies (1)
-
@Zenie@piaille.fr 2026-02-21 14:07
@ramin_hal9001 @screwlisp I might have missed it, but defvar-local, setq-local might give some insights. Buffers are indeed a big suitcase of local stuff.