[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99957: Warn rather than error when m
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99957: Warn rather than error when making a local var inside a let. |
Date: |
Tue, 20 Apr 2010 13:35:16 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99957
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-04-20 13:35:16 -0400
message:
Warn rather than error when making a local var inside a let.
* data.c (Fmake_variable_buffer_local, Fmake_local_variable):
Just signal a warning rather than an error when inside a let.
(Fmake_variable_frame_local): Add the same test.
modified:
src/ChangeLog
src/data.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-04-20 17:17:29 +0000
+++ b/src/ChangeLog 2010-04-20 17:35:16 +0000
@@ -1,5 +1,9 @@
2010-04-20 Stefan Monnier <address@hidden>
+ * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
+ Just signal a warning rather than an error when inside a let.
+ (Fmake_variable_frame_local): Add the same test.
+
* font.c (syms_of_font): Make the style table vars read-only.
* buffer.h (struct buffer): Remove unused var `direction_reversed'.
=== modified file 'src/data.c'
--- a/src/data.c 2010-04-20 01:50:52 +0000
+++ b/src/data.c 2010-04-20 17:35:16 +0000
@@ -1639,8 +1639,8 @@
Lisp_Object symbol;
XSETSYMBOL (symbol, sym); /* In case `variable' is aliased. */
if (let_shadows_global_binding_p (symbol))
- error ("Making %s buffer-local while let-bound!",
- SDATA (SYMBOL_NAME (variable)));
+ message ("Making %s buffer-local while let-bound!",
+ SDATA (SYMBOL_NAME (variable)));
}
}
@@ -1702,7 +1702,8 @@
}
if (sym->constant)
- error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME
(variable)));
+ error ("Symbol %s may not be buffer-local",
+ SDATA (SYMBOL_NAME (variable)));
if (blv ? blv->local_if_set
: (forwarded && BUFFER_OBJFWDP (valcontents.fwd)))
@@ -1722,8 +1723,9 @@
Lisp_Object symbol;
XSETSYMBOL (symbol, sym); /* In case `variable' is aliased. */
if (let_shadows_global_binding_p (symbol))
- error ("Making %s local to %s while let-bound!",
- SDATA (SYMBOL_NAME (variable)), SDATA (current_buffer->name));
+ message ("Making %s local to %s while let-bound!",
+ SDATA (SYMBOL_NAME (variable)),
+ SDATA (current_buffer->name));
}
}
@@ -1899,6 +1901,13 @@
blv->frame_local = 1;
sym->redirect = SYMBOL_LOCALIZED;
SET_SYMBOL_BLV (sym, blv);
+ {
+ Lisp_Object symbol;
+ XSETSYMBOL (symbol, sym); /* In case `variable' is aliased. */
+ if (let_shadows_global_binding_p (symbol))
+ message ("Making %s frame-local while let-bound!",
+ SDATA (SYMBOL_NAME (variable)));
+ }
return variable;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99957: Warn rather than error when making a local var inside a let.,
Stefan Monnier <=