[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/eval.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/eval.c |
Date: |
Mon, 22 Nov 2004 00:32:54 -0500 |
Index: emacs/src/eval.c
diff -c emacs/src/eval.c:1.225 emacs/src/eval.c:1.226
*** emacs/src/eval.c:1.225 Sat Nov 20 10:26:24 2004
--- emacs/src/eval.c Mon Nov 22 05:26:50 2004
***************
*** 786,791 ****
--- 786,806 ----
{
if (NILP (tem))
Fset_default (sym, Feval (Fcar (tail)));
+ else
+ { /* Check if there is really a global binding rather than just a let
+ binding that shadows the global unboundness of the var. */
+ struct specbinding *pdl = specpdl_ptr;
+ while (--pdl >= specpdl)
+ {
+ if (EQ (pdl->symbol, sym) && !pdl->func
+ && EQ (pdl->old_value, Qunbound))
+ {
+ message_with_string ("Warning: defvar ignored because %s is
let-bound",
+ SYMBOL_NAME (sym), 1);
+ break;
+ }
+ }
+ }
tail = Fcdr (tail);
tem = Fcar (tail);
if (!NILP (tem))