GNU bug report logs - #73853
Should and-let* become a synonym for when-let*?

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 17 Oct 2024 16:31:02 UTC

Severity: wishlist

Found in version 31.0.50

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 Stefan Kangas <stefankangas <at> gmail.com>, 73853 <at> debbugs.gnu.org
Subject: Re: bug#73853: 31.0.50; Should and-let* become a synonym for
 when-let*?
Date: Fri, 22 Nov 2024 14:46:30 -0500
>>>>   - I'd like to go ahead and install a patch marking when-let and if-let
>>>>     as obsolete, unless Michael is keen to be the one to do it as the
>>>>     initiator of the previous effort
[...]
> Done.

Beside the use of `make-obsolete` instead of putting the `obsolete`
inside `declare`, I see a more serious problem with this patch.
E.g.

    (defun my-foo () (when-let ((x (point))) (goto-char x)))

gives 2 warnings rather than one:

    In my-foo:
    foo.el:3:19: Warning: ‘when-let’ is an obsolete macro (as of 31.1); use
        ‘when-let*’ or ‘and-let*’ instead.
    foo.el:3:2: Warning: ‘if-let’ is an obsolete macro (as of 31.1); use ‘if-let*’
        instead.


- Stefan





This bug report was last modified 141 days ago.

Previous Next


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