bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50005: 28.0.50; silence a couple byte-compiler warnings in ERC


From: J.P.
Subject: bug#50005: 28.0.50; silence a couple byte-compiler warnings in ERC
Date: Thu, 12 Aug 2021 03:56:45 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Mattias Engdegård <mattiase@acm.org> writes:

> Oops (two typos), but thanks for illustrating the problems with:

Thanks, I spotted the weird double-quote mismatch thing earlier, but I
guess I'm still missing something else? Sorry, I'm quite blind/dumb, as
I'm sure you've gathered.

Anyway, I suppose, if we're using `rx-to-string' or `regexp-opt', then
that entire line can just be 86ed.

>  (rx-to-string `(+ (in ,@(string-to-list erc-lurker-ignore-chars))) t)
>
> or
>
>  (concat (regexp-opt (mapcar #'char-to-string erc-lurker-ignore-chars)) "+")

So, I take this to mean there's no problem with requiring (autoloading)
rx.el (or regexp-opt.el), right? I mean, I'd really like to use rx forms
elsewhere in ERC. So if nobody has a problem with it, let's do it! (Cc.
bandali.)

And I guess the `string-to-list' is necessary because

  (rx-to-string '(+ (in "abc")) t)
   ⇒ "[a-c]+"

is still interpreted as a set of character alternatives, whereas

  (rx-to-string '(+ (in ?a ?- ?c)) t)
   ⇒ "[ac-]+"

combines individual character args into just such a set. Thanks for
pointing that out. I'm sure I would have missed that.

Do you use ERC, Mattias? If so, are you available to review more
patches? I'm obviously quite ignorant in the ways of Emacs but am
pushing hard to improve ERC. Some might say that's a recipe for
embarrassment/disaster (though I'm pretty sure I already crossed that
first bridge ages ago).

So what do you say, can you help? I of course would welcome the
experience and obviously don't mind sharing (or even surrendering
complete) credit for anything. (Guess you'd have to weight any potential
cap feathers/plaudits against the indelible smirch of being associated
with the likes of me.) But let me know either way! Thanks.

Attachment: 0001-Fix-mistake-in-test-for-erc-ring-previous-command.patch
Description: Text Data

Attachment: 0002-Fix-a-couple-byte-compiler-warnings-in-erc.el.patch
Description: Text Data


reply via email to

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