/[emacs]/emacs/lispref/compile.texi
ViewVC logotype

Diff of /emacs/lispref/compile.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12.8.1 by miles, Fri Apr 4 06:20:41 2003 UTC revision 1.12.8.2 by miles, Tue Oct 14 23:10:11 2003 UTC
# Line 39  Emacs 19.29; as a result, files compiled Line 39  Emacs 19.29; as a result, files compiled
39  not work in subsequent versions if they contain character constants with  not work in subsequent versions if they contain character constants with
40  modifier bits.  modifier bits.
41    
42    @vindex no-byte-compile
43      If you do not want a Lisp file to be compiled, ever, put a file-local
44    variable binding for @code{no-byte-compile} into it, like this:
45    
46    @example
47    ;; -*-no-byte-compile: t; -*-
48    @end example
49    
50    @xref{Compilation Errors}, for how to investigate errors occurring in    @xref{Compilation Errors}, for how to investigate errors occurring in
51  byte compilation.  byte compilation.
52    
# Line 48  byte compilation. Line 56  byte compilation.
56  * Docs and Compilation::        Dynamic loading of documentation strings.  * Docs and Compilation::        Dynamic loading of documentation strings.
57  * Dynamic Loading::             Dynamic loading of individual functions.  * Dynamic Loading::             Dynamic loading of individual functions.
58  * Eval During Compile::         Code to be evaluated when you compile.  * Eval During Compile::         Code to be evaluated when you compile.
59    * Compiler Errors::             Handling compiler error messages.
60  * Byte-Code Objects::           The data type used for byte-compiled functions.  * Byte-Code Objects::           The data type used for byte-compiled functions.
61  * Disassembly::                 Disassembling byte-code; how to read byte-code.  * Disassembly::                 Disassembling byte-code; how to read byte-code.
62  @end menu  @end menu
# Line 397  Common Lisp @samp{#.} reader macro (but Line 406  Common Lisp @samp{#.} reader macro (but
406  to what @code{eval-when-compile} does.  to what @code{eval-when-compile} does.
407  @end defspec  @end defspec
408    
409    @node Compiler Errors
410    @section Compiler Errors
411    @cindex compiler errors
412    
413      Byte compilation writes errors and warnings into the buffer
414    @samp{*Compile-Log*}.  The messages include file names and line
415    numbers that identify the location of the problem.  The usual Emacs
416    commands for operating on compiler diagnostics work properly on
417    these messages.
418    
419      However, the warnings about functions that were used but not
420    defined are always ``located'' at the end of the file, so these
421    commands won't find the places they are really used.  To do that,
422    you must search for the function names.
423    
424      You can suppress the compiler warning for calling an undefined
425    function @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
433    The call to @var{func} must be in the @var{then-form} of the @code{if},
434    and @var{func} must appear quoted in the call to @code{fboundp}.
435    Likewise, you can suppress a compiler warning for an unbound variable
436    @var{variable} by conditionalizing its use on a @code{boundp} test,
437    like this:
438    
439    @example
440    (if (boundp '@var{variable}) ...@var{variable}...)
441    @end example
442    
443    @noindent
444    The 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...
452    In execution, this is equivalent to @code{(progn @var{body}...)},
453    but the compiler does not issue warnings for anything that occurs
454    inside @var{body}.
455    
456    We recommend that you use this construct around the smallest
457    possible piece of code.
458    @end defmac
459    
460  @node Byte-Code Objects  @node Byte-Code Objects
461  @section Byte-Code Function Objects  @section Byte-Code Function Objects
462  @cindex compiled function  @cindex compiled function
# Line 742  The @code{silly-loop} function is somewh Line 802  The @code{silly-loop} function is somewh
802  @end example  @end example
803    
804    
805    @ignore
806       arch-tag: f78e3050-2f0a-4dee-be27-d9979a0a2289
807    @end ignore

Legend:
Removed from v.1.12.8.1  
changed lines
  Added in v.1.12.8.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26