1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00
emacs/doc
Mattias Engdegård c60b59e04c Disallow creation of circular variable alias chains
Make `defvaralias` signal an error upon attempts to create variable
alias cycles.  This detects errors earlier and makes the alias
traversal during execution simpler and faster since no cycle detection
is needed elsewhere.
Now variable and function aliases are handled identically in these
respects.

* src/lisp.h (indirect_variable): Remove declaration.
* src/data.c (indirect_variable): Remove.
(Findirect_variable): Update doc string.  Simplify alias resolution.
(Fboundp, find_symbol_value, set_internal, default_value)
(set_default_internal, Fmake_variable_buffer_local)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
* src/buffer.c (buffer_local_value):
* src/eval.c (specbind): Simplify variable alias resolution.
(Fdefvaralias): Update doc string.  Check for cycles.
* doc/lispref/variables.texi (Variable Aliases):
Mention that `defvaralias` can signal `cyclic-variable-indirection`
but `indirect-variable` cannot.
* etc/NEWS: Announce the change.
* test/src/eval-tests.el (eval-tests-defvaralias): New test.
2023-04-14 19:34:23 +02:00
..
emacs Merge from origin/emacs-29 2023-04-06 14:38:20 -04:00
lispintro ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lispref Disallow creation of circular variable alias chains 2023-04-14 19:34:23 +02:00
man ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
misc Improve C++ concept indentation. 2023-04-14 16:37:33 +00:00