* bug#53178: ert should use existing explainers for aliases
@ 2022-01-11 5:17 Stefan Kangas
2022-01-13 8:48 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Kangas @ 2022-01-11 5:17 UTC (permalink / raw)
To: 53178
Severity: minor
There exists an ert explainer for `string-equal', but it is not used if
`string=' (an alias for `string-equal') is used in the test.
This should be fixed such that an existing explainer is always used for
an alias.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#53178: ert should use existing explainers for aliases
2022-01-11 5:17 bug#53178: ert should use existing explainers for aliases Stefan Kangas
@ 2022-01-13 8:48 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-13 8:48 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 53178
Stefan Kangas <stefan@marxist.se> writes:
> There exists an ert explainer for `string-equal', but it is not used if
> `string=' (an alias for `string-equal') is used in the test.
>
> This should be fixed such that an existing explainer is always used for
> an alias.
I started implementing this, but then I ran into the problem of possible
defalias loops. I thought we had a function somewhere that would just
return the defalias chain, but I can't find it anywhere. And indeed:
(defalias 'a 'b)
(defalias 'b 'a)
And then `C-h f a RET' will infloop because
(defun help-fns--analyze-function (function)
[...]
((and aliased (not (subrp def)))
(let ((f real-function))
(while (and (fboundp f)
(symbolp (symbol-function f)))
(setq f (symbol-function f)))
f))
So I've now added a new function for this, fixed the infloop in
help-fns, and fixed the explainer lookup in ert.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-13 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-11 5:17 bug#53178: ert should use existing explainers for aliases Stefan Kangas
2022-01-13 8:48 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.