Mercurial > hg > xemacs-beta
comparison src/eval.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 | 578c6447aa28 |
children | 141c2920ea48 3742ea8250b5 |
comparison
equal
deleted
inserted
replaced
3024:b7f26b2f78bd | 3025:facf3239ba30 |
---|---|
201 is handled, but different from the condition-handler list (which is | 201 is handled, but different from the condition-handler list (which is |
202 a simple Lisp list) and the specbind stack, which is a contiguous | 202 a simple Lisp list) and the specbind stack, which is a contiguous |
203 array of `struct specbinding's, grown (using realloc()) as | 203 array of `struct specbinding's, grown (using realloc()) as |
204 necessary. (Note that all four of these lists behave as a stacks.) | 204 necessary. (Note that all four of these lists behave as a stacks.) |
205 | 205 |
206 Catches are created by declaring a 'struct catchtag' locally, | 206 Catches are created by declaring a `struct catchtag' locally, |
207 filling the .TAG field in with the tag, and doing a setjmp() on | 207 filling the .TAG field in with the tag, and doing a setjmp() on |
208 .JMP. Fthrow() will store the value passed to it in .VAL and | 208 .JMP. Fthrow() will store the value passed to it in .VAL and |
209 longjmp() back to .JMP, back to the function that established the | 209 longjmp() back to .JMP, back to the function that established the |
210 catch. This will always be either internal_catch() (catches | 210 catch. This will always be either internal_catch() (catches |
211 established internally or through `catch') or condition_case_1 | 211 established internally or through `catch') or condition_case_1 |
477 is set. (Otherwise, XEmacs would infinitely recurse, attempting to | 477 is set. (Otherwise, XEmacs would infinitely recurse, attempting to |
478 enter the debugger.) entering_debugger gets reset to 0 as soon | 478 enter the debugger.) entering_debugger gets reset to 0 as soon |
479 as a backtrace is displayed, so that further errors can indeed be | 479 as a backtrace is displayed, so that further errors can indeed be |
480 handled normally. | 480 handled normally. |
481 | 481 |
482 We also establish a catch for 'debugger. If the debugger function | 482 We also establish a catch for `debugger'. If the debugger function |
483 throws to this instead of returning a value, it means that the user | 483 throws to this instead of returning a value, it means that the user |
484 pressed 'c' (pretend like the debugger was never entered). The | 484 pressed 'c' (pretend like the debugger was never entered). The |
485 function then returns Qunbound. (If the user pressed 'r', for | 485 function then returns Qunbound. (If the user pressed 'r', for |
486 return a value, then the debugger function returns normally with | 486 return a value, then the debugger function returns normally with |
487 this value.) | 487 this value.) |
547 return !UNBOUNDP (v) ? v : val; | 547 return !UNBOUNDP (v) ? v : val; |
548 } | 548 } |
549 | 549 |
550 /* Called when debug-on-call behavior is called for. Enter the debugger | 550 /* Called when debug-on-call behavior is called for. Enter the debugger |
551 with the appropriate args for this. VAL is either t for a call | 551 with the appropriate args for this. VAL is either t for a call |
552 through `eval' or 'lambda for a call through `funcall'. | 552 through `eval' or `lambda' for a call through `funcall'. |
553 | 553 |
554 #### The differentiation here between EVAL and FUNCALL is bogus. | 554 #### The differentiation here between EVAL and FUNCALL is bogus. |
555 FUNCALL can be defined as | 555 FUNCALL can be defined as |
556 | 556 |
557 (defmacro func (fun &rest args) | 557 (defmacro func (fun &rest args) |
1654 #endif | 1654 #endif |
1655 | 1655 |
1656 /* If bomb_out_p is t, this is being called from Fsignal as a | 1656 /* If bomb_out_p is t, this is being called from Fsignal as a |
1657 "last resort" when there is no handler for this error and | 1657 "last resort" when there is no handler for this error and |
1658 the debugger couldn't be invoked, so we are throwing to | 1658 the debugger couldn't be invoked, so we are throwing to |
1659 'top-level. If this tag doesn't exist (happens during the | 1659 `top-level'. If this tag doesn't exist (happens during the |
1660 initialization stages) we would get in an infinite recursive | 1660 initialization stages) we would get in an infinite recursive |
1661 Fsignal/Fthrow loop, so instead we bomb out to the | 1661 Fsignal/Fthrow loop, so instead we bomb out to the |
1662 really-early-error-handler. | 1662 really-early-error-handler. |
1663 | 1663 |
1664 Note that in fact the only time that the "last resort" | 1664 Note that in fact the only time that the "last resort" |
1665 occurs is when there's no catch for 'top-level -- the | 1665 occurs is when there's no catch for `top-level' -- the |
1666 'top-level catch and the catch-all error handler are | 1666 `top-level' catch and the catch-all error handler are |
1667 established at the same time, in initial_command_loop/ | 1667 established at the same time, in initial_command_loop/ |
1668 top_level_1. | 1668 top_level_1. |
1669 | 1669 |
1670 [[#### Fix this horrifitude!]] | 1670 [[#### Fix this horrifitude!]] |
1671 | 1671 |
2383 /* If no handler is present now, try to run the debugger, | 2383 /* If no handler is present now, try to run the debugger, |
2384 and if that fails, throw to top level. | 2384 and if that fails, throw to top level. |
2385 | 2385 |
2386 #### The only time that no handler is present is during | 2386 #### The only time that no handler is present is during |
2387 temacs or perhaps very early in XEmacs. In both cases, | 2387 temacs or perhaps very early in XEmacs. In both cases, |
2388 there is no 'top-level catch. (That's why the | 2388 there is no `top-level' catch. (That's why the |
2389 "bomb-out" hack was added.) | 2389 "bomb-out" hack was added.) |
2390 | 2390 |
2391 [[#### Fix this horrifitude!]] | 2391 [[#### Fix this horrifitude!]] |
2392 | 2392 |
2393 I don't think this is horrifitude, but just defensive coding. --ben */ | 2393 I don't think this is horrifitude, but just defensive coding. --ben */ |