From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 53178@debbugs.gnu.org
Subject: bug#53178: ert should use existing explainers for aliases
Date: Thu, 13 Jan 2022 09:48:56 +0100 [thread overview]
Message-ID: <87tue86mx3.fsf@gnus.org> (raw)
In-Reply-To: <CADwFkm=vjKYraM8e9k6aXeF=0wwuyZURLKfvpk9J25nKienr+A@mail.gmail.com> (Stefan Kangas's message of "Mon, 10 Jan 2022 23:17:40 -0600")
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
prev parent reply other threads:[~2022-01-13 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 5:17 bug#53178: ert should use existing explainers for aliases Stefan Kangas
2022-01-13 8:48 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tue86mx3.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=53178@debbugs.gnu.org \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).