1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
emacs/doc
Mattias Engdegård db3fea2e5c Detect and prevent function alias loops in fset and defalias
Make `fset` and `defalias` signal an error on attempts to create
circular alias chains.  This is more effective, efficient and
convenient than permitting alias loops to be created and trying to
detect them at run time each time a function is called, which is what
we have been doing until now, badly.

* lisp/help-fns.el (help-fns--analyze-function):
Don't pass obsolete argument.
* lisp/subr.el (function-alias-p):
* src/data.c (indirect_function, Findirect_function): Simplify.
Now error-free, second argument obsolete.
(Ffset): Detect loops.
* test/lisp/help-fns-tests.el (help-fns--analyze-function-recursive):
* test/lisp/subr-tests.el (test-alias-p):
Adapt tests.
* test/src/data-tests.el (data-tests-fset, data-tests-defalias): New.
* doc/lispref/eval.texi (Function Indirection):
* doc/lispref/functions.texi (Defining Functions, Function Cells):
Update manual.
* etc/NEWS: Announce.
2023-02-21 10:42:00 +01:00
..
emacs Merge from origin/emacs-29 2023-02-21 10:28:34 +01:00
lispintro ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lispref Detect and prevent function alias loops in fset and defalias 2023-02-21 10:42:00 +01:00
man ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
misc Merge from origin/emacs-29 2023-02-19 11:38:09 +01:00