[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Byte-compilation warnings
From: |
Tim X |
Subject: |
Re: Byte-compilation warnings |
Date: |
Wed, 11 Jun 2008 18:07:13 +1000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
"Drew Adams" <drew.adams@oracle.com> writes:
>> When I byte-compile my elisp files I get lots of warnings
>> concerning cl:
>>
>> Warning: Function `evenp' from cl package called at runtime
>>
>> I find that annoying because (a) it drowns important warnings
>> and (b) it is about a coding convention for packages
>> distributed with Emacs that does not concern me at the moment.
>> Surely, Emacs maintainers are able to
>> determine if something from cl is called at run time without
>> spamming the compile log for every user.
>
> I sympathize with you.
>
> FWIW, however, I appreciate this warning (information, really) as a user. I
> want
> to recognize when I might want to either code something differently or use
> (eval-when-compile (require 'cl)).
>
>> How can I get rid of it?
>
> Dunno. It would be nice if compiler messages could be silenced in classes
> (e.g.
> info, warnings). Maybe they can.
>
In Emacs CVS you have byte-compile-warnings
,----[ C-h v byte-compile-warnings RET ]
| byte-compile-warnings is a variable defined in `bytecomp.el'.
| Its value is
| (redefine callargs free-vars unresolved obsolete)
|
|
| This variable is safe as a file local variable if its value
| satisfies the predicate `byte-compile-warnings-safe-p'.
|
| Documentation:
| *List of warnings that the byte-compiler should issue (t for all).
|
| Elements of the list may be:
|
| free-vars references to variables not in the current lexical scope.
| unresolved calls to unknown functions.
| callargs function calls with args that don't match the definition.
| redefine function name redefined from a macro to ordinary function or
vice
| versa, or redefined to take a different number of arguments.
| obsolete obsolete variables and functions.
| noruntime functions that may not be defined at runtime (typically
| defined only under `eval-when-compile').
| cl-functions calls to runtime functions from the CL package (as
| distinguished from macros and aliases).
| interactive-only
| commands that normally shouldn't be called from Lisp code.
| make-local calls to make-variable-buffer-local that may be incorrect.
| mapcar mapcar called for effect.
|
| If the list begins with `not', then the remaining elements specify warnings to
| suppress. For example, (not mapcar) will suppress warnings about mapcar.
|
| You can customize this variable.
`----
However, I strongly suggest peole try to understand why they are getting
the warning and where possible, get rid of it by getting rid of the
cause rather than just hiding it.
regards,
Tim
--
tcross (at) rapttech dot com dot au
Re: Byte-compilation warnings, Nikolaj Schumacher, 2008/06/10
Message not available
- Re: Byte-compilation warnings,
Tim X <=