[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Show *compilation* only if build did not succeed
From: |
Amin Bandali |
Subject: |
Re: Show *compilation* only if build did not succeed |
Date: |
Sun, 23 Dec 2018 09:59:58 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Hi Stefan,
On 2018-12-23 9:29 AM, Stefan Monnier wrote:
>> Out of curiosity, is there any way to silence the “ad-handle-definition:
>> ‘compilation-start’ got redefined” warning locally? I tried wrapping my
>> workaround in a (let ((ad-redefinition-action 'accept)) ...), but that
>> doesn’t seem to do it.
>
> ad-redefinition-action is consulted when compilation-start is defined
> (i.e. when loading compile.el), that's why your let has no effect.
>
> If you use the newer `advice-add` instead of the older `defadvice` you
> shouldn't get any warning (it's one of the "features" I didn't bother
> to port).
That makes sense, thanks. And TIL about advice-add! On a side note, it
seems wrapping the workaround in a (with-eval-after-load 'compile ...)
also suppresses the warning, without needing ad-redefinition-action set.
> But you can also just do
>
> (setq ad-redefinition-action 'accept)
Indeed. My reasoning was to try and minimize its effect in my init file
so that I would still be able to see the warning if triggered elsewhere.
>
>
> Stefan
>
Best,
amin