comparison src/cmdloop.c @ 3025:facf3239ba30

[xemacs-hg @ 2005-10-25 11:16:19 by ben] rename new->new_, convert 'foo to `foo' EmacsFrame.c, ExternalClient.c, ExternalShell.c, chartab.c, cmdloop.c, compiler.h, console.c, database.c, device-msw.c, device-x.c, device.c, doc.c, dragdrop.c, eval.c, event-msw.c, event-stream.c, events.c, extents.c, file-coding.c, fns.c, frame-tty.c, frame.c, gpmevent.c, gutter.c, hash.c, imgproc.c, indent.c, keymap.c, lisp-union.h, macros.c, malloc.c, marker.c, menubar-x.c, menubar.c, mule-charset.c, number.c, process.c, profile.h, ralloc.c, redisplay.c, select-common.h, select.c, syntax.c, sysfile.h, sysproc.h, systime.h, syswindows.h, toolbar.c, tooltalk.c, tparam.c, unexaix.c, unexalpha.c, unexconvex.c, unexec.c, unexhp9k800.c, unexmips.c, unicode.c, window.c: new -> new_. 'foo -> `foo'. lwlib-internal.h: redo assert macros to follow lisp.h and not trigger warnings. lwlib.c, xlwtabs.c: new -> new_.
author ben
date Tue, 25 Oct 2005 11:16:49 +0000
parents 989a7680c221
children 3465c3161fea
comparison
equal deleted inserted replaced
3024:b7f26b2f78bd 3025:facf3239ba30
172 and from call_command_loop(). 172 and from call_command_loop().
173 173
174 call_command_loop() is called when a macro is started and when the 174 call_command_loop() is called when a macro is started and when the
175 minibuffer is entered; normal termination of the macro or 175 minibuffer is entered; normal termination of the macro or
176 minibuffer causes a throw out of the recursive command loop. (To 176 minibuffer causes a throw out of the recursive command loop. (To
177 'execute-kbd-macro for macros and 'exit for minibuffers. Note also 177 `execute-kbd-macro' for macros and `exit' for minibuffers. Note also
178 that the low-level minibuffer-entering function, 178 that the low-level minibuffer-entering function,
179 `read-minibuffer-internal', provides its own error handling and 179 `read-minibuffer-internal', provides its own error handling and
180 does not need command_loop_2()'s error encapsulation; so it tells 180 does not need command_loop_2()'s error encapsulation; so it tells
181 call_command_loop() to invoke command_loop_1() directly.) 181 call_command_loop() to invoke command_loop_1() directly.)
182 182
183 Note that both read-minibuffer-internal and recursive-edit set 183 Note that both read-minibuffer-internal and recursive-edit set
184 up a catch for 'exit; this is why `abort-recursive-edit', which 184 up a catch for `exit'; this is why `abort-recursive-edit', which
185 throws to this catch, exits out of either one. 185 throws to this catch, exits out of either one.
186 186
187 initial_command_loop(), called from main(), sets up a catch 187 initial_command_loop(), called from main(), sets up a catch
188 for 'top-level when invoking command_loop_2(), allowing functions 188 for `top-level' when invoking command_loop_2(), allowing functions
189 to throw all the way to the top level if they really need to. 189 to throw all the way to the top level if they really need to.
190 Before invoking command_loop_2(), initial_command_loop() calls 190 Before invoking command_loop_2(), initial_command_loop() calls
191 top_level_1(), which handles all of the startup stuff (creating 191 top_level_1(), which handles all of the startup stuff (creating
192 the initial frame, handling the command-line options, loading 192 the initial frame, handling the command-line options, loading
193 the user's .emacs file, etc.). The function that actually does this 193 the user's .emacs file, etc.). The function that actually does this
194 is in Lisp and is pointed to by the variable `top-level'; 194 is in Lisp and is pointed to by the variable `top-level';
195 normally this function is `normal-top-level'. top_level_1() is 195 normally this function is `normal-top-level'. top_level_1() is
196 just an error-handling wrapper similar to command_loop_2(). 196 just an error-handling wrapper similar to command_loop_2().
197 Note also that initial_command_loop() sets up a catch for 'top-level 197 Note also that initial_command_loop() sets up a catch for `top-level'
198 when invoking top_level_1(), just like when it invokes 198 when invoking top_level_1(), just like when it invokes
199 command_loop_2(). */ 199 command_loop_2(). */
200 200
201 201
202 static Lisp_Object 202 static Lisp_Object
284 /* This function can GC */ 284 /* This function can GC */
285 if (!NILP (load_me)) 285 if (!NILP (load_me))
286 Vtop_level = list2 (Qload, load_me); 286 Vtop_level = list2 (Qload, load_me);
287 287
288 /* First deal with startup and command-line arguments. A throw 288 /* First deal with startup and command-line arguments. A throw
289 to 'top-level gets us back here directly (does this ever happen?). 289 to `top-level' gets us back here directly (does this ever happen?).
290 Otherwise, this function will return normally when all command- 290 Otherwise, this function will return normally when all command-
291 line arguments have been processed, the user's initialization 291 line arguments have been processed, the user's initialization
292 file has been read in, and the first frame has been created. */ 292 file has been read in, and the first frame has been created. */
293 internal_catch (Qtop_level, top_level_1, Qnil, 0, 0, 0); 293 internal_catch (Qtop_level, top_level_1, Qnil, 0, 0, 0);
294 294
307 for (;;) 307 for (;;)
308 { 308 {
309 command_loop_level = 0; 309 command_loop_level = 0;
310 MARK_MODELINE_CHANGED; 310 MARK_MODELINE_CHANGED;
311 /* Now invoke the command loop. It never returns; however, a 311 /* Now invoke the command loop. It never returns; however, a
312 throw to 'top-level will place us at the end of this loop. */ 312 throw to `top-level' will place us at the end of this loop. */
313 internal_catch (Qtop_level, command_loop_2, Qnil, 0, 0, 0); 313 internal_catch (Qtop_level, command_loop_2, Qnil, 0, 0, 0);
314 /* #### wrong with selected-console? */ 314 /* #### wrong with selected-console? */
315 /* We don't actually call clear_echo_area() here, partially 315 /* We don't actually call clear_echo_area() here, partially
316 at least because that runs Lisp code and it may be unsafe 316 at least because that runs Lisp code and it may be unsafe
317 to do so -- we are outside of the normal catches for 317 to do so -- we are outside of the normal catches for