Next: , Previous: , Up: Interacting With Lisp   [Contents][Index]


9.5 Compiling Files

These commands are used to compile source (".lisp") files, producing binary (".fasl") output files. Note that unlike the other compiling and evalating commands, this does not have the effect of placing the definitions in the environment; to do so, the binary file must be loaded.

Command: Compile Buffer File (bound to C-x c)
Hemlock Variable: Compile Buffer File Confirm (initial value t)

This command asks for confirmation, then saves the current buffer (when modified) and compiles the associated file. The confirmation prompt indicates intent to save and compile or just compile. If the buffer wasn’t modified, and a comparison of the write dates for the source and corresponding binary (".fasl") file suggests that recompilation is unnecessary, the confirmation also indicates this. A prefix argument overrides this test and forces recompilation. Since there is a complete log of output in the background buffer, the creation of the normal error output (".err") file is inhibited.

Setting Compile Buffer File Confirm to nil inhibits confirmation, except when the binary is up to date and a prefix argument is not supplied.

Command: Compile File

This command prompts for a file and compiles that file, providing a convenient way to compile a file that isn’t in any buffer. Unlike Compile Buffer File, this command doesn’t do any consistency checks such as checking whether the source is in a modified buffer or the binary is up to date.

Command: Compile Group
Command: List Compile Group

Compile Group does a Save All Files and then compiles every ".lisp" file for which the corresponding ".fasl" file is older or nonexistent. The files are compiled in the order in which they appear in the group definition. A prefix argument forces compilation of all ".lisp" files.

List Compile Group lists any files that would be compiled by Compile Group. All Modified files are saved before checking to generate a consistent list.

Command: Set Compile Server
Command: Set Buffer Compile Server
Command: Current Compile Server

These commands are analogous to Set Eval Server, Set Buffer Eval Server and Current Eval Server, but they determine the eval server used for file compilation requests. If the user specifies a compile server, then the file compilation commands send compilation requests to that server instead of the current eval server.

Having a separate compile server makes it easy to do compilations in the background while continuing to interact with your eval server and editor. The compile server can also run on a remote machine relieving your active development machine of the compilation effort.

Command: Next Compiler Error (bound to H-n)
Command: Previous Compiler Error (bound to H-p)

These commands provides a convenient way to inspect compiler errors. First it splits the current window if there is only one window present. Hemlock positions the current point in the first window at the erroneous source code for the next (or previous) error. Then in the second window, it displays the error beginning at the top of the window. Given an argument, this command skips that many errors.

Command: Flush Compiler Error Information

This command relieves the current eval server of all infomation about errors encountered while compiling. This is convenient if you have been compiling a lot, but you were ignoring errors and warnings. You don’t want to step through all the old errors, so you can use this command immediately before compiling a file whose errors you intend to edit.

Hemlock Variable: Remote Compile File (initial value nil)

When true, this variable causes file compilations to be done using the RFS remote file system mechanism by prepending "/../host" to the file being compiled. This allows the compile server to be run on a different machine, but requires that the source be world readable. If false, commands use source filenames directly. Do NOT use this to compile files in AFS.


Next: Querying the Environment, Previous: Compiling and Evaluating Lisp Code, Up: Interacting With Lisp   [Contents][Index]