comparison man/building.texi @ 66133:3e340cd42f9f

(Compilation Mode, Compilation): Clarified.
author Richard M. Stallman <rms@gnu.org>
date Mon, 17 Oct 2005 02:34:49 +0000
parents ef546abd2887
children 4a7b16ad0fba
comparison
equal deleted inserted replaced
66132:3fe20f1edf7b 66133:3e340cd42f9f
61 directory is used as the working directory for the execution of the 61 directory is used as the working directory for the execution of the
62 command; normally, therefore, the compilation happens in this 62 command; normally, therefore, the compilation happens in this
63 directory. 63 directory.
64 64
65 @vindex compile-command 65 @vindex compile-command
66 When the shell command line is read, the minibuffer appears 66 The default for the compilation command is normally @samp{make -k},
67 containing a default command line, which is the command you used the 67 which is correct most of the time for nontrivial programs.
68 last time you did @kbd{M-x compile}. If you type just @key{RET}, the 68 (@xref{Top,, Make, make, GNU Make Manual}.) If you have done @kbd{M-x
69 same command line is used again. For the first @kbd{M-x compile}, the 69 compile} before, the default each time is the command you used the
70 default is @samp{make -k}, which is correct most of the time for 70 previous time. @code{compile} stores this command in the variable
71 nontrivial programs. (@xref{Top,, Make, make, GNU Make Manual}.) 71 @code{compile-command}, so setting that variable specifies the default
72 The default compilation command comes from the variable 72 for the next use of @kbd{M-x compile}. If a file specifies a file
73 @code{compile-command}; if the appropriate compilation command for a 73 local value for @code{compile-command}, that provides the default when
74 file is something other than @samp{make -k}, it can be useful for the 74 you type @kbd{M-x compile} in that file's buffer. @xref{File
75 file to specify a local value for @code{compile-command} (@pxref{File 75 Variables}.
76 Variables}).
77 76
78 Starting a compilation displays the buffer @samp{*compilation*} in 77 Starting a compilation displays the buffer @samp{*compilation*} in
79 another window but does not select it. The buffer's mode line tells 78 another window but does not select it. The buffer's mode line tells
80 you whether compilation is finished, with the word @samp{run}, 79 you whether compilation is finished, with the word @samp{run},
81 @samp{signal} or @samp{exit} inside the parentheses. You do not have 80 @samp{signal} or @samp{exit} inside the parentheses. You do not have
230 previously had @code{next-error} called on it, it is used. Else, 229 previously had @code{next-error} called on it, it is used. Else,
231 if the current buffer can be the target of @code{next-error}, it is 230 if the current buffer can be the target of @code{next-error}, it is
232 used. Else, all the buffers Emacs manages are tried for 231 used. Else, all the buffers Emacs manages are tried for
233 @code{next-error} support. 232 @code{next-error} support.
234 233
234 If you're not in the compilation buffer when you run
235 @code{next-error}, Emacs will look for a buffer that contains error
236 messages. First, it looks for one displayed in the selected frame,
237 then for one that previously had @code{next-error} called on it, and
238 then at the current buffer. Finally, Emacs looks at all the remaining
239 buffers. @code{next-error} signals an error if it can't find any such
240 buffer.
241
235 @kbd{C-u C-x `} starts scanning from the beginning of the compilation 242 @kbd{C-u C-x `} starts scanning from the beginning of the compilation
236 buffer. This is one way to process the same set of errors again. 243 buffer. This is one way to process the same set of errors again.
237 244
238 @vindex compilation-error-regexp-alist 245 @vindex compilation-error-regexp-alist
239 @vindex grep-regexp-alist 246 @vindex grep-regexp-alist