emacs-devel
[Top][All Lists]
Advanced

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

Re: Three Flymake backends Was Re: Two issues with the new Flymake


From: João Távora
Subject: Re: Three Flymake backends Was Re: Two issues with the new Flymake
Date: Sun, 05 Nov 2017 13:22:59 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

> On 11/5/17 2:59 PM, João Távora wrote:
>
>> Oops. But I've just pushed the correct set emacs-26 if you want to have
>> a look now.
>
> Thanks! Now we have a backend for 'ruby -w', that's great, but Rubocop
> has become a pretty essential tool in Ruby world. For our team, at
> least.
>
> So sooner or later we'll need a backend for it too, for parity with
> Flycheck.

I think the doors are still open for the "sooner" case :-) I don't have
rubucop, but defining new backends of the
"feed-to-stdin-then-parse-with-regexp" type is really easy (and of
really verbose, but we're trying to fix that)

>>>> So I'm thinking that, for master (_not_ emacs-26) we could use a
>>>> declarative flymake-define-simple-backend macro.
>>> Why not make it a function? From what I can see, the usage will just
>>> have to quote the first two arguments.
>>
>> Because the macro defines a new function.
>
> Ah, yes. It would have to use 'eval' in that case.
>
> Although the other option, I think, is for the said function to return
> a lambda. The return value could be used with `defalias' or with
> `add-hook' directly.

All of this is more verbose than the relatively standard way of using
"define" macros.

And add-hook for lambda's is not very nice imo because there isn't a
easy way to remove-hook afterwards.  In the future, remove-hook with a
cl-like KEY arg and a working pair of function-get/function-put could
change that though...





reply via email to

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