mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-27 15:52:00 -08:00
* eval.c (Fdefvar): Rename locals to avoid shadowing.
This commit is contained in:
parent
8b2c52e913
commit
1faed8ae39
2 changed files with 19 additions and 16 deletions
|
|
@ -7,6 +7,7 @@
|
|||
(Fdefvar): Rewrite so as not to use empty "else".
|
||||
(lisp_indirect_variable): Name an expression,
|
||||
to avoid gcc -Wbad-function-cast warning.
|
||||
(Fdefvar): Rename locals to avoid shadowing.
|
||||
|
||||
* callint.c (quotify_arg, quotify_args): Now static.
|
||||
(Fcall_interactively): Rename locals to avoid shadowing.
|
||||
|
|
|
|||
34
src/eval.c
34
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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue