From: Paul Pogonyshev <pogonyshev@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: suppressable byte compilation warnings and cconv.el
Date: Thu, 14 Apr 2016 10:44:52 +0200 [thread overview]
Message-ID: <CAG7Bpapb6Kt6gfDXi8nUiek7Q0uHYdRcFTU=sX7Y3vrLW5M4Lw@mail.gmail.com> (raw)
In-Reply-To: <CAG7BparB2CUN23Z9BcHkTsSiu8cydNVHR75Q=JD9aZoYZz0CFg@mail.gmail.com>
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 <pogonyshev@gmail.com> 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 <monnier@iro.umontreal.ca> 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
>>
>>
next prev parent reply other threads:[~2016-04-14 8:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 20:17 suppressable byte compilation warnings and cconv.el Paul Pogonyshev
2016-04-14 1:35 ` Stefan Monnier
2016-04-14 7:49 ` Paul Pogonyshev
2016-04-14 8:44 ` Paul Pogonyshev [this message]
2016-04-14 12:04 ` Stefan Monnier
2016-04-14 15:44 ` Paul Pogonyshev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG7Bpapb6Kt6gfDXi8nUiek7Q0uHYdRcFTU=sX7Y3vrLW5M4Lw@mail.gmail.com' \
--to=pogonyshev@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.