aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRichard M. Stallman2007-11-24 16:00:21 +0000
committerRichard M. Stallman2007-11-24 16:00:21 +0000
commitfc37ae728d88a115c8e1b5c2d9d7705284e5f40e (patch)
tree1a428a093ef23c53d46a4025ba87d89634a5edf1 /doc
parentd9e43b70c686200c146bf0762a9f0b97ff309245 (diff)
downloademacs-fc37ae728d88a115c8e1b5c2d9d7705284e5f40e.tar.gz
emacs-fc37ae728d88a115c8e1b5c2d9d7705284e5f40e.zip
(Compiler Errors): Clarify previous change.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/compile.texi24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index fdd145ac9f1..292c52a6dfa 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -505,12 +505,14 @@ The call to @var{func} must be in the @var{then-form} of the
505@code{if}, and @var{func} must appear quoted in the call to 505@code{if}, and @var{func} must appear quoted in the call to
506@code{fboundp}. (This feature operates for @code{cond} as well.) 506@code{fboundp}. (This feature operates for @code{cond} as well.)
507 507
508 You can tell the compiler that a function is defined using a 508 You can tell the compiler that a function is defined using
509@code{declare-function} statement (@pxref{Declaring Functions}). 509@code{declare-function} (@pxref{Declaring Functions}). Likewise, you
510can tell the compiler that a variable is defined using @code{defvar}
511with no initial value.
510 512
511 Likewise, you can suppress a compiler warning for an unbound variable 513 You can suppress the compiler warning for a specific use of an
512@var{variable} by conditionalizing its use on a @code{boundp} test, 514undefined variable @var{variable} by conditionalizing its use on a
513like this: 515@code{boundp} test, like this:
514 516
515@example 517@example
516(if (boundp '@var{variable}) ...@var{variable}...) 518(if (boundp '@var{variable}) ...@var{variable}...)
@@ -521,11 +523,8 @@ The reference to @var{variable} must be in the @var{then-form} of the
521@code{if}, and @var{variable} must appear quoted in the call to 523@code{if}, and @var{variable} must appear quoted in the call to
522@code{boundp}. 524@code{boundp}.
523 525
524 You can tell the compiler that a variable is defined using a 526 You can suppress any and all compiler warnings within a certain
525@code{defvar} statement with no initial value. 527expression using the construct @code{with-no-warnings}:
526
527 You can suppress any compiler warnings using the construct
528@code{with-no-warnings}:
529 528
530@c This is implemented with a defun, but conceptually it is 529@c This is implemented with a defun, but conceptually it is
531@c a special form. 530@c a special form.
@@ -536,10 +535,11 @@ but the compiler does not issue warnings for anything that occurs
536inside @var{body}. 535inside @var{body}.
537 536
538We recommend that you use this construct around the smallest 537We recommend that you use this construct around the smallest
539possible piece of code. 538possible piece of code, to avoid missing possible warnings other than one
539one you intend to suppress.
540@end defspec 540@end defspec
541 541
542More precise control of warnings is possible by setting the variable 542 More precise control of warnings is possible by setting the variable
543@code{byte-compile-warnings}. 543@code{byte-compile-warnings}.
544 544
545@node Byte-Code Objects 545@node Byte-Code Objects