Does Emacs have a way to set buffer-local properties on symbols?
It's well-known that there are buffer-local variables. But a property belongs to a symbol, not to a variable. Hence, if I have understood correctly, making a variable foo
buffer-local has no effect on on properties set on the symbol foo
.
(Note: In Emacs Lisp, the term property can refer to anything having to do with property lists (plists), including their uses for text properties, symbol properties, and other things. This question is about symbol properties specifically.)
lisp-indent-function
andscheme-indent-function
property values in different buffers. That particular problem is probably more easily solved using a customlisp-indent-function
that doesn't use symbol properties. But I asked the present question anyway out of curiosity.function-get
and put are not really separate from symbol properties. All they do is check the symbol property, and ifnil
then they check thesymbol-function
and follow an autoload trail to get to the ultimate symbol. IOW, they look for the symbol that represents the function, and then useget
on that symbol.