GNU bug report logs - #53178
ert should use existing explainers for aliases

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Tue, 11 Jan 2022 05:18:01 UTC

Severity: minor

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53178 in the body.
You can then email your comments to 53178 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53178; Package emacs. (Tue, 11 Jan 2022 05:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 11 Jan 2022 05:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: ert should use existing explainers for aliases
Date: Mon, 10 Jan 2022 23:17:40 -0600
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53178; Package emacs. (Thu, 13 Jan 2022 08:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 53178 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 53178 <at> debbugs.gnu.org
Subject: Re: bug#53178: ert should use existing explainers for aliases
Date: Thu, 13 Jan 2022 09:48:56 +0100
Stefan Kangas <stefan <at> 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




bug marked as fixed in version 29.1, send any further explanations to 53178 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Jan 2022 08:50:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Feb 2022 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.