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.
The following commits were skipped:
a5b5f73d88 xref--insert-xrefs: Use 'shadow' for the line number colon
6b90877359 * lisp/progmodes/xref.el (xref--insert-xrefs): Remove ext...
25c65e6b58 Backport: Fix xref-clear-marker-stack refactoring mistake
* lisp/edmacro.el (edmacro-sanitize-for-string):
This condition should not have been 'repaired' but removed altogether.
Do so now, fixing bug#61647.
Reported by Eduardo Ochs.
* lisp/progmodes/elisp-mode.el (elisp--xref-infer-namespace):
Handle defclass parents (bug#61640).
* test/lisp/progmodes/elisp-mode-tests.el (elisp-mode-infer-namespace):
New case in the test.
* lisp/progmodes/xref.el (xref--insert-xrefs): Use face 'shadow' for
the line number colon instead of continuing it face (bug#61340).
(cherry picked from commit d6d25a3c22)
* lisp/progmodes/xref.el (xref-clear-marker-stack):
Clear the history correctly. Changing a lexical variable has no effect.
(cherry picked from commit dfdc0f5fb7)
This fixes bug #61629.
* lisp/imenu.el (imenu--mouse-menu): Test (consp (cdadr menu)) to avoid
confusion with a single entry for a single function.
(imenu-update-menubar): Change the code to match that above.
Previously, defaulting to the empty string put candidates without
:sortText to the top of the list. since string-lessp is safe with nil
arguments, this makes them sort to the end instead.
* lisp/progmodes/eglot.el (eglot-completion-at-point): Simplify.
* lisp/simple.el (kill-buffer--possibly-save): Don't request
LONG-FORM from 'read-multiple-choice' if GUI dialog should be
used.
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Doc fix.
(read-multiple-choice--short-answers): Don't append "?" to
CHOICES and don't display the prompt in the echo area if GUI
dialog is used. Use 'use-dialog-box-p'. (Bug#61553)
* doc/lispref/compile.texi (Native-Compilation Variables):
Document the interpretation of non-absolute directory names that
are the value of 'native-comp-enable-subr-trampolines'.
Rather than look up a dynamically scoped var to decide whether to trim
closures, use an ad-hoc marker on those closures which should not be trimmed.
* lisp/emacs-lisp/cconv.el (cconv-dont-trim-unused-variables): Delete var.
(cconv-make-interpreted-closure): Use a `:closure-dont-trim-context`
markers instead.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Use
`:closure-dont-trim-context` rather than `cconv-dont-trim-unused-variables`.
* lisp/emacs-lisp/testcover.el (testcover-analyze-coverage): Remove
workaround for `cconv-dont-trim-unused-variables`.
* test/lisp/emacs-lisp/cconv-tests.el (cconv-safe-for-space): New test.
* lisp/net/tramp.el (tramp-completion-handle-file-exists-p):
Improve user name completion.
(tramp-skeleton-file-exists-p): New defmacro, which also handles
host name completion.
(tramp-handle-file-exists-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-exists-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-exists-p):
Use it.
* src/window.c (Fwindow_use_time): Doc fix.
(Fwindow_bump_use_time): Bump use time of the seleceted window as
well. Doc fix.
* lisp/window.el (display-buffer-avoid-small-windows): Remove.
All users changed.
(window--display-buffer): Bump window use time when requested.
(display-buffer--lru-window): New function.
(display-buffer-use-some-window): Use it.
(display-buffer-use-least-recent-window): Rewrite and enhance doc
string.
* doc/lispref/windows.texi (Selecting Windows)
(Buffer Display Action Functions, Buffer Display Action Alists)
(The Zen of Buffer Display): Improve and update documentation of
window selection and display facilities.
* lisp/emulation/viper-cmd.el (viper-enable-minibuffer-faces): New
defcustom.
(viper-set-mode-vars-for): Use it to decide whether to use
distinct faces in the minibuffer. (Bug#61432)
Copyright-paperwork-exempt: yes
* lisp/progmodes/python.el (python-shell-buffer-substring): Add
`save-excursion' to prevent the point from moving.
* test/lisp/progmodes/python-tests.el (python-tests-should-not-move):
New helper function to assert that point does not move while calling a
function.
(python-shell-buffer-substring-*): Use
`python-tests-should-not-move'. (Bug#61463)