576 |
(@pxref{Customization}). |
(@pxref{Customization}). |
577 |
|
|
578 |
@strong{Warning:} If the @code{defconst} and @code{defvar} special |
@strong{Warning:} If the @code{defconst} and @code{defvar} special |
579 |
forms are used while the variable has a local binding, they set the |
forms are used while the variable has a local binding (made with |
580 |
local binding's value; the global binding is not changed. This is not |
@code{let}, or a function argument), they set the local-binding's |
581 |
what you usually want. To prevent it, use these special forms at top |
value; the top-level binding is not changed. This is not what you |
582 |
level in a file, where normally no local binding is in effect, and make |
usually want. To prevent it, use these special forms at top level in |
583 |
sure to load the file before making a local binding for the variable. |
a file, where normally no local binding is in effect, and make sure to |
584 |
|
load the file before making a local binding for the variable. |
585 |
|
|
586 |
@node Tips for Defining |
@node Tips for Defining |
587 |
@section Tips for Defining Variables Robustly |
@section Tips for Defining Variables Robustly |
1750 |
@end defvar |
@end defvar |
1751 |
|
|
1752 |
@defun risky-local-variable-p sym |
@defun risky-local-variable-p sym |
1753 |
Returns non-nil if @var{sym} is risky for any of the reasons stated above. |
Returns non-@code{nil} if @var{sym} is risky for any of the reasons |
1754 |
|
stated above. |
1755 |
@end defun |
@end defun |
1756 |
|
|
1757 |
The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs |
The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs |