emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#68401: 30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `er


From: J.P.
Subject: Re: bug#68401: 30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. 2nd attempt
Date: Tue, 23 Jan 2024 17:38:07 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Emanuel Berg <incal@dataswamp.org> writes:

> J.P. wrote:
>
>> I don't understand the point of adding your purpose-built
>> predicate `erc--connected-and-joined-p' if you're not going
>> to use it to replace
>>
>>   (lambda () (erc-channel-p (erc-default-target)))
>>
>> completely. IOW, having both is redundant
>

Redundant from the POV of `erc--connected-and-joined-p' because it calls
`erc--current-buffer-joined-p' (which see). Please compare that
function's definition to the lambda. There are overlapping concerns
there. That is, one "subsumes" the other, thus obviating the need for
it.

> ??
>
> (lambda () (erc-channel-p (erc-default-target)))
>
> has been there all along, you then told me to add the
> "logical" connectivity test.
>
> If we can just use the lambda, I'll be happy to drop the test.

You can't just use the lambda, but you can lose it entirely in favor of
your predicate.

>
>> If you're not already doing so, please try expanding your
>> macro use sites to verify correctness.
>
> ???
>
> My "macro use sites" is what?

If you expand one of your `erc-with-all-buffers-of-server' forms with
both the lambda and `erc--connected-and-joined-p' present, it should
become clear why only the latter is needed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]