aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorJim Blandy1992-06-24 05:09:26 +0000
committerJim Blandy1992-06-24 05:09:26 +0000
commitdaa3760289bd389e8c174c8d24b375cd875cd911 (patch)
tree0abe3e6108e0e5a7c98f4c4aa68a495b0ecef09a /src/eval.c
parenta4275ad1c8f60239b0bad43cef97ca86d35a51a3 (diff)
downloademacs-daa3760289bd389e8c174c8d24b375cd875cd911.tar.gz
emacs-daa3760289bd389e8c174c8d24b375cd875cd911.zip
*** empty log message ***
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c
index d3d475f4d10..0e012d45008 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -41,8 +41,9 @@ struct backtrace
41 struct backtrace *next; 41 struct backtrace *next;
42 Lisp_Object *function; 42 Lisp_Object *function;
43 Lisp_Object *args; /* Points to vector of args. */ 43 Lisp_Object *args; /* Points to vector of args. */
44 int nargs; /* length of vector */ 44 int nargs; /* Length of vector.
45 /* if nargs is UNEVALLED, args points to slot holding list of unevalled args */ 45 If nargs is UNEVALLED, args points to slot holding
46 list of unevalled args */
46 char evalargs; 47 char evalargs;
47 /* Nonzero means call value of debugger when done with this operation. */ 48 /* Nonzero means call value of debugger when done with this operation. */
48 char debug_on_exit; 49 char debug_on_exit;
@@ -451,20 +452,33 @@ and input is currently coming from the keyboard (not in keyboard macro).")
451 if (!INTERACTIVE) 452 if (!INTERACTIVE)
452 return Qnil; 453 return Qnil;
453 454
454 /* Unless the object was compiled, skip the frame of interactive-p itself
455 (if interpreted) or the frame of byte-code (if called from
456 compiled function). */
457 btp = backtrace_list; 455 btp = backtrace_list;
458 if (XTYPE (*btp->function) != Lisp_Compiled) 456
457 /* If this isn't a byte-compiled function, there may be a frame at
458 the top for Finteractive_p itself. If so, skip it. */
459 fun = Findirect_function (*btp->function);
460 if (XTYPE (fun) == Lisp_Subr
461 && (struct Lisp_Subr *) XPNTR (fun) == &Sinteractive_p)
459 btp = btp->next; 462 btp = btp->next;
460 while (btp 463
461 && (btp->nargs == UNEVALLED || EQ (*btp->function, Qbytecode))) 464 /* If we're running an Emacs 18-style byte-compiled function, there
465 may be a frame for Fbytecode. Now, given the strictest
466 definition, this function isn't really being called
467 interactively, but because that's the way Emacs 18 always builds
468 byte-compiled functions, we'll accept it for now. */
469 if (EQ (*btp->function, Qbytecode))
470 btp = btp->next;
471
472 /* If this isn't a byte-compiled function, then we may now be
473 looking at several frames for special forms. Skip past them. */
474 while (btp &&
475 btp->nargs == UNEVALLED)
462 btp = btp->next; 476 btp = btp->next;
463 477
464 /* btp now points at the frame of the innermost function 478 /* btp now points at the frame of the innermost function that isn't
465 that DOES eval its args. 479 a special form, ignoring frames for Finteractive_p and/or
466 If it is a built-in function (such as load or eval-region) 480 Fbytecode at the top. If this frame is for a built-in function
467 return nil. */ 481 (such as load or eval-region) return nil. */
468 fun = Findirect_function (*btp->function); 482 fun = Findirect_function (*btp->function);
469 if (XTYPE (fun) == Lisp_Subr) 483 if (XTYPE (fun) == Lisp_Subr)
470 return Qnil; 484 return Qnil;
@@ -2320,8 +2334,8 @@ See also variable `debug-on-quit'.");
2320 2334
2321 DEFVAR_BOOL ("debug-on-quit", &debug_on_quit, 2335 DEFVAR_BOOL ("debug-on-quit", &debug_on_quit,
2322 "*Non-nil means enter debugger if quit is signaled (C-G, for example).\n\ 2336 "*Non-nil means enter debugger if quit is signaled (C-G, for example).\n\
2323Does not apply if quit is handled by a `condition-case'. 2337Does not apply if quit is handled by a `condition-case'.\n\
2324A non-nil value is equivalent to a `debug-on-error' value containing 'quit."); 2338A non-nil value is equivalent to a `debug-on-error' value containing `quit'.");
2325 debug_on_quit = 0; 2339 debug_on_quit = 0;
2326 2340
2327 DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call, 2341 DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call,