diff options
| author | Richard M. Stallman | 2007-11-24 16:00:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-11-24 16:00:21 +0000 |
| commit | fc37ae728d88a115c8e1b5c2d9d7705284e5f40e (patch) | |
| tree | 1a428a093ef23c53d46a4025ba87d89634a5edf1 /doc | |
| parent | d9e43b70c686200c146bf0762a9f0b97ff309245 (diff) | |
| download | emacs-fc37ae728d88a115c8e1b5c2d9d7705284e5f40e.tar.gz emacs-fc37ae728d88a115c8e1b5c2d9d7705284e5f40e.zip | |
(Compiler Errors): Clarify previous change.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/compile.texi | 24 |
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 |
| 510 | can tell the compiler that a variable is defined using @code{defvar} | ||
| 511 | with 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, | 514 | undefined variable @var{variable} by conditionalizing its use on a |
| 513 | like 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. | 527 | expression 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 | |||
| 536 | inside @var{body}. | 535 | inside @var{body}. |
| 537 | 536 | ||
| 538 | We recommend that you use this construct around the smallest | 537 | We recommend that you use this construct around the smallest |
| 539 | possible piece of code. | 538 | possible piece of code, to avoid missing possible warnings other than one |
| 539 | one you intend to suppress. | ||
| 540 | @end defspec | 540 | @end defspec |
| 541 | 541 | ||
| 542 | More 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 |