From 475545b50099448132747e79b70bbb4199559d09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:28:57 -0700 Subject: * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static. --- src/eval.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index d0effc755a2..f9ed8712eb3 100644 --- a/src/eval.c +++ b/src/eval.c @@ -158,7 +158,7 @@ restore_stack_limits (Lisp_Object data) /* Call the Lisp debugger, giving it argument ARG. */ -Lisp_Object +static Lisp_Object call_debugger (Lisp_Object arg) { int debug_while_redisplaying; @@ -214,7 +214,7 @@ call_debugger (Lisp_Object arg) return unbind_to (count, val); } -void +static void do_debug_on_call (Lisp_Object code) { debug_on_next_call = 0; @@ -1637,7 +1637,7 @@ See also the function `condition-case'. */) if (!NILP (clause)) break; } - + if (/* Don't run the debugger for a memory-full error. (There is no room in memory to do that!) */ !NILP (error_symbol) @@ -1654,13 +1654,13 @@ See also the function `condition-case'. */) can continue code which has signaled a quit. */ if (debugger_called && EQ (real_error_symbol, Qquit)) return Qnil; - } + } if (!NILP (clause)) { Lisp_Object unwind_data = (NILP (error_symbol) ? data : Fcons (error_symbol, data)); - + h->chosen_clause = clause; unwind_to_catch (h->tag, unwind_data); } @@ -1672,7 +1672,7 @@ See also the function `condition-case'. */) if (! NILP (error_symbol)) data = Fcons (error_symbol, data); - + string = Ferror_message_string (data); fatal ("%s", SDATA (string), 0); } @@ -3057,7 +3057,7 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, return object; } -void +static void grow_specpdl (void) { register int count = SPECPDL_INDEX (); @@ -3589,4 +3589,3 @@ The value the function returns is not used. */); defsubr (&Sbacktrace); defsubr (&Sbacktrace_frame); } - -- cgit v1.2.1 From d28a21703d47c6983e91d3d4a464546750519236 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:30:17 -0700 Subject: * eval.c (Fdefvar): Rewrite so as not to use empty "else". --- src/eval.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index f9ed8712eb3..4f6d3dd015d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -801,10 +801,11 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) LOADHIST_ATTACH (sym); } else - /* Simple (defvar ) should not count as a definition at all. - It could get in the way of other definitions, and unloading this - package could try to make the variable unbound. */ - ; + { + /* Simple (defvar ) should not count as a definition at all. + It could get in the way of other definitions, and unloading this + package could try to make the variable unbound. */ + } return sym; } -- cgit v1.2.1 From cfcbfb1aa5d013f114bc002110166fd1f5392f56 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:34:28 -0700 Subject: * eval.c (lisp_indirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. --- src/eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 4f6d3dd015d..affafadfecf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -856,7 +856,8 @@ user_variable_p_eh (Lisp_Object ignore) static Lisp_Object lisp_indirect_variable (Lisp_Object sym) { - XSETSYMBOL (sym, indirect_variable (XSYMBOL (sym))); + struct Lisp_Symbol *s = indirect_variable (XSYMBOL (sym)); + XSETSYMBOL (sym, s); return sym; } -- cgit v1.2.1 From 1faed8ae39da845b9e39d2ce7f20ee9f4e32fc31 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:44:19 -0700 Subject: * eval.c (Fdefvar): Rename locals to avoid shadowing. --- src/eval.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index affafadfecf..f68274e6e8c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -764,11 +764,11 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) if (SYMBOL_CONSTANT_P (sym)) { /* For upward compatibility, allow (defvar :foo (quote :foo)). */ - Lisp_Object tem = Fcar (tail); - if (! (CONSP (tem) - && EQ (XCAR (tem), Qquote) - && CONSP (XCDR (tem)) - && EQ (XCAR (XCDR (tem)), sym))) + Lisp_Object tem1 = Fcar (tail); + if (! (CONSP (tem1) + && EQ (XCAR (tem1), Qquote) + && CONSP (XCDR (tem1)) + && EQ (XCAR (XCDR (tem1)), sym))) error ("Constant symbol `%s' specified in defvar", SDATA (SYMBOL_NAME (sym))); } @@ -2539,8 +2539,8 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) } else { - Lisp_Object globals = Qnil; - GCPRO3 (sym, val, globals); + Lisp_Object global_vals = Qnil; + GCPRO3 (sym, val, global_vals); for (; CONSP (val) && ((cond == to_completion) @@ -2552,23 +2552,25 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) { /* t indicates this hook has a local binding; it means to run the global binding too. */ - globals = Fdefault_value (sym); - if (NILP (globals)) continue; + global_vals = Fdefault_value (sym); + if (NILP (global_vals)) continue; - if (!CONSP (globals) || EQ (XCAR (globals), Qlambda)) + if (!CONSP (global_vals) || EQ (XCAR (global_vals), Qlambda)) { - args[0] = globals; + args[0] = global_vals; ret = Ffuncall (nargs, args); } else { for (; - CONSP (globals) && ((cond == to_completion) - || (cond == until_success ? NILP (ret) - : !NILP (ret))); - globals = XCDR (globals)) + (CONSP (global_vals) + && (cond == to_completion + || (cond == until_success + ? NILP (ret) + : !NILP (ret)))); + global_vals = XCDR (global_vals)) { - args[0] = XCAR (globals); + args[0] = XCAR (global_vals); /* In a global value, t should not occur. If it does, we must ignore it to avoid an endless loop. */ if (!EQ (args[0], Qt)) -- cgit v1.2.1