[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suppressable byte compilation warnings and cconv.el
From: |
Paul Pogonyshev |
Subject: |
Re: suppressable byte compilation warnings and cconv.el |
Date: |
Thu, 14 Apr 2016 10:44:52 +0200 |
To clarify why I want it. I have some procedurally generated
functions, which I byte-compile after generation. I would like to
avoid renaming attributes in the generator (not to mention the logic
needed to detect whether they are used), instead I'd just temporarily
suppress "unused x" warnings during this particular byte compilation.
Paul
On 14 April 2016 at 09:49, Paul Pogonyshev <address@hidden> wrote:
>> You can silence those (and yes, selectively this time) by prefixing the
>> variable name with an underscore, which makes it explicit that you know
>> the variable is not used.
>
> Yes, I know about that, but that means you have to go about each
> individual warning in every function. And remember to rename
> parameters by adding/removing underscore when usage inside the
> function changes. I'd like to also have the ability to silence all
> such warnings altogether.
>
> Paul
>
> On 14 April 2016 at 03:35, Stefan Monnier <address@hidden> wrote:
>>> In file `bytecomp.el' there is a customizable variable
>>> `byte-compile-warnings' that allows one to selectively silence certain
>>> warnings.
>>
>> I wouldn't use the word "selectively" to describe it.
>> It's extremely coarse only allowing you to control broad categories of
>> errors file-wide.
>>
>>> In particular, I'm annoyed by warnings like this:
>>> Warning: Unused lexical argument ‘size’
>>
>> You can silence those (and yes, selectively this time) by prefixing the
>> variable name with an underscore, which makes it explicit that you know
>> the variable is not used.
>>
>>
>> Stefan
>>
>>