aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-08-06 01:17:13 +0000
committerRichard M. Stallman2003-08-06 01:17:13 +0000
commitfe45b975b94bccc550eafc37b160bdd8695e8d46 (patch)
tree2d4726fccd8656859bbfbedb0b5d1898c9032202
parent8e5f951071ef79a55a58cf4a1247ec18798dc94c (diff)
downloademacs-fe45b975b94bccc550eafc37b160bdd8695e8d46.tar.gz
emacs-fe45b975b94bccc550eafc37b160bdd8695e8d46.zip
(Compiler Errors): Explain with-no-warnings
and other ways to suppress warnings.
-rw-r--r--lispref/compile.texi36
1 files changed, 36 insertions, 0 deletions
diff --git a/lispref/compile.texi b/lispref/compile.texi
index 583454efe73..5ce8c45ee9e 100644
--- a/lispref/compile.texi
+++ b/lispref/compile.texi
@@ -421,6 +421,42 @@ defined are always ``located'' at the end of the file, so these
421commands won't find the places they are really used. To do that, 421commands won't find the places they are really used. To do that,
422you must search for the function names. 422you must search for the function names.
423 423
424 You can suppress the compiler warning for calling an undefined
425function @var{func} by conditionalizing the function call on a
426@code{fboundp} test, like this:
427
428@example
429(if (fboundp '@var{func}) ...(@var{func} ...)...)
430@end example
431
432@noindent
433The call to @var{func} must be in the @var{then-form} of the @code{if},
434and @var{func} must appear quoted in the call to @code{fboundp}.
435Likewise, you can suppress a compiler warning for an unbound variable
436@var{variable} by conditionalizing its use on a @code{boundp} test,
437like this:
438
439@example
440(if (boundp '@var{variable}) ...@var{variable}...)
441@end example
442
443@noindent
444The reference to @var{variable} must be in the @var{then-form} of the
445@code{if}, and @var{variable} must appear quoted in the call to
446@code{boundp}.
447
448 You can suppress any compiler warnings using the construct
449@code{with-no-warnings}:
450
451@defmac with-no-warnings body...
452In execution, this is equivalent to @code{(progn @var{body}...)},
453but the compiler does not issue warnings for anything that occurs
454inside @var{body}.
455
456We recommend that you use this construct around the smallest
457possible piece of code.
458@end defun
459
424@node Byte-Code Objects 460@node Byte-Code Objects
425@section Byte-Code Function Objects 461@section Byte-Code Function Objects
426@cindex compiled function 462@cindex compiled function