aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-01-14 22:59:33 +0000
committerLuc Teirlinck2004-01-14 22:59:33 +0000
commite75c1a57f7d262845b072f1789ca646fc952528f (patch)
treeb5f6858031fc1cf2a658d2d373681779c63789f8
parent944e099f4321831f962b629ab3b0d1755be47e8f (diff)
downloademacs-e75c1a57f7d262845b072f1789ca646fc952528f.tar.gz
emacs-e75c1a57f7d262845b072f1789ca646fc952528f.zip
(Compilation Functions): Expand descriptions of `compile-defun',
`byte-compile-file', `byte-recompile-directory' and `batch-byte-compile'. In particular, mention and describe all optional arguments. (Disassembly): Correct and clarify the description of `disassemble'.
-rw-r--r--lispref/ChangeLog2
-rw-r--r--lispref/compile.texi62
2 files changed, 42 insertions, 22 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 2926eb90d30..78ac60ecb1d 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,7 +1,7 @@
12004-01-14 Luc Teirlinck <teirllm@auburn.edu> 12004-01-14 Luc Teirlinck <teirllm@auburn.edu>
2 2
3 * compile.texi (Compilation Functions): Expand descriptions of 3 * compile.texi (Compilation Functions): Expand descriptions of
4 `compile-defun', `byte-compile-file', byte-recompile-directory' 4 `compile-defun', `byte-compile-file', `byte-recompile-directory'
5 and `batch-byte-compile'. In particular, mention and describe 5 and `batch-byte-compile'. In particular, mention and describe
6 all optional arguments. 6 all optional arguments.
7 (Disassembly): Correct and clarify the description of `disassemble'. 7 (Disassembly): Correct and clarify the description of `disassemble'.
diff --git a/lispref/compile.texi b/lispref/compile.texi
index 4d91d2c5883..960b00dd6fc 100644
--- a/lispref/compile.texi
+++ b/lispref/compile.texi
@@ -173,14 +173,18 @@ variable names and function names used by the function, except for
173certain primitives that are coded as special instructions. 173certain primitives that are coded as special instructions.
174@end defun 174@end defun
175 175
176@deffn Command compile-defun 176@deffn Command compile-defun &optional arg
177This command reads the defun containing point, compiles it, and 177This command reads the defun containing point, compiles it, and
178evaluates the result. If you use this on a defun that is actually a 178evaluates the result. If you use this on a defun that is actually a
179function definition, the effect is to install a compiled version of that 179function definition, the effect is to install a compiled version of that
180function. 180function.
181
182@code{compile-defun} normally displays the result of evaluation in the
183echo area, but if @var{arg} is non-@code{nil}, it inserts the result
184in the current buffer after the form it compiled.
181@end deffn 185@end deffn
182 186
183@deffn Command byte-compile-file filename 187@deffn Command byte-compile-file filename &optional load
184This function compiles a file of Lisp code named @var{filename} into a 188This function compiles a file of Lisp code named @var{filename} into a
185file of byte-code. The output file's name is made by changing the 189file of byte-code. The output file's name is made by changing the
186@samp{.el} suffix into @samp{.elc}; if @var{filename} does not end in 190@samp{.el} suffix into @samp{.elc}; if @var{filename} does not end in
@@ -193,8 +197,11 @@ batch is compiled, and written so that its compiled code will be
193executed when the file is read. All comments are discarded when the 197executed when the file is read. All comments are discarded when the
194input file is read. 198input file is read.
195 199
196This command returns @code{t}. When called interactively, it prompts 200This command returns @code{t} if there were no errors and @code{nil}
197for the file name. 201otherwise. When called interactively, it prompts for the file name.
202
203If @var{load} is non-@code{nil}, this command loads the compiled file
204after compiling it. Interactively, @var{load} is the prefix argument.
198 205
199@example 206@example
200@group 207@group
@@ -215,20 +222,28 @@ for the file name.
215@end example 222@end example
216@end deffn 223@end deffn
217 224
218@deffn Command byte-recompile-directory directory flag 225@deffn Command byte-recompile-directory directory &optional flag force
219@cindex library compilation 226@cindex library compilation
220This function recompiles every @samp{.el} file in @var{directory} that 227This command recompiles every @samp{.el} file in @var{directory} (or
221needs recompilation. A file needs recompilation if a @samp{.elc} file 228its subdirectories) that needs recompilation. A file needs
222exists but is older than the @samp{.el} file. 229recompilation if a @samp{.elc} file exists but is older than the
230@samp{.el} file.
231
232When a @samp{.el} file has no corresponding @samp{.elc} file,
233@var{flag} says what to do. If it is @code{nil}, this command ignores
234these files. If @var{flag} is 0, it compiles them. If it is neither
235@code{nil} nor 0, it asks the user whether to compile each such file.
223 236
224When a @samp{.el} file has no corresponding @samp{.elc} file, @var{flag} 237Interactively, @code{byte-recompile-directory} prompts for
225says what to do. If it is @code{nil}, these files are ignored. If it 238@var{directory} and @var{flag} is the prefix argument.
226is non-@code{nil}, the user is asked whether to compile each such file.
227 239
228The returned value of this command is unpredictable. 240If @var{force} is non-@code{nil}, this command recompiles every
241@samp{.el} file that has a @samp{.elc} file.
242
243The returned value is unpredictable.
229@end deffn 244@end deffn
230 245
231@defun batch-byte-compile 246@defun batch-byte-compile &optional noforce
232This function runs @code{byte-compile-file} on files specified on the 247This function runs @code{byte-compile-file} on files specified on the
233command line. This function must be used only in a batch execution of 248command line. This function must be used only in a batch execution of
234Emacs, as it kills Emacs on completion. An error in one file does not 249Emacs, as it kills Emacs on completion. An error in one file does not
@@ -236,6 +251,9 @@ prevent processing of subsequent files, but no output file will be
236generated for it, and the Emacs process will terminate with a nonzero 251generated for it, and the Emacs process will terminate with a nonzero
237status code. 252status code.
238 253
254If @var{noforce} is non-@code{nil}, this function does not recompile
255files that have an up-to-date @samp{.elc} file.
256
239@example 257@example
240% emacs -batch -f batch-byte-compile *.el 258% emacs -batch -f batch-byte-compile *.el
241@end example 259@end example
@@ -420,7 +438,7 @@ these messages.
420defined are always ``located'' at the end of the file, so these 438defined are always ``located'' at the end of the file, so these
421commands won't find the places they are really used. To do that, 439commands won't find the places they are really used. To do that,
422you must search for the function names. 440you must search for the function names.
423 441
424 You can suppress the compiler warning for calling an undefined 442 You can suppress the compiler warning for calling an undefined
425function @var{func} by conditionalizing the function call on a 443function @var{func} by conditionalizing the function call on a
426@code{fboundp} test, like this: 444@code{fboundp} test, like this:
@@ -549,14 +567,16 @@ returns it as the value of the function.
549ordinary Lisp variables, by transferring values between variables and 567ordinary Lisp variables, by transferring values between variables and
550the stack. 568the stack.
551 569
552@deffn Command disassemble object &optional stream 570@deffn Command disassemble object &optional buffer-or-name
553This function prints the disassembled code for @var{object}. If 571This command displays the disassembled code for @var{object}. In
554@var{stream} is supplied, then output goes there. Otherwise, the 572interactive use, or if @var{buffer-or-name} is @code{nil} or omitted,
555disassembled code is printed to the stream @code{standard-output}. The 573the output goes in a buffer named @samp{*Disassemble*}. If
556argument @var{object} can be a function name or a lambda expression. 574@var{buffer-or-name} is non-@code{nil}, it must be a buffer or the
575name of an existing buffer. Then the output goes there, at point, and
576point is left before the output.
557 577
558As a special exception, if this function is used interactively, 578The argument @var{object} can be a function name, a lambda expression
559it outputs to a buffer named @samp{*Disassemble*}. 579or a byte-code object.
560@end deffn 580@end deffn
561 581
562 Here are two examples of using the @code{disassemble} function. We 582 Here are two examples of using the @code{disassemble} function. We