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 #162 received at 73853 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 73853 <at> debbugs.gnu.org
Subject: Re: bug#73853: 31.0.50;
 Should and-let* become a synonym for when-let*?
Date: Sat, 23 Nov 2024 11:14:43 -0500
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> On Fri 22 Nov 2024 at 02:46pm -05, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>
>> Beside the use of `make-obsolete` instead of putting the `obsolete`
>> inside `declare`,
>
> I didn't know about this distinction.  Can you let me know why it would
> be better to use a declaration?

AFAIK, while they are technically the same, using a declaration is
cleaner.  We prefer it for that reason.

>> 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:
>
> I think this is just inherent to the fact that these macros depend on
> each other, though it would be nice to fix if we can.

I think `with-suppressed-warnings` should work here.




This bug report was last modified 140 days ago.

Previous Next


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