[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: crazy interaction between buffer-locality and function-locality of v
Re: crazy interaction between buffer-locality and function-locality of variables
Sun, 2 Nov 2008 09:43:15 -0800
> > It seems to me that this behavior is broken, but if it's to be kept
> It's partly broken, but other behaviors are broken in other ways.
> The only good solution is to be careful not to mix them up (except when
> it's really wanted, such as with default-directory which is often
My point was that the only way to avoid mixing the behaviors is to
make variable names unwieldy. As an async-event-handler-writer all
function arguments and local variables must be
globally-uniquely-named, and as a major-mode writer all buffer-local
variables must be globally-uniquely-named. The latter is perhaps not
too terrible a burden, but the former would make coding in elisp
unbearable IMO. I'll report this to the gnus devel list.
> > there needs to be strong guidance against making variables whose names
> > /aren't/ prefixed with the package name buffer-local.
> Agreed. Where would you like to see it? In the coding conventions?
At least also at the same place as the warning about the conflict
between buffer-locals and let-binding in elisp.info that I pointed to
in my original email. But also this should be a great big warning in
the defun docs of the make-variable-*-local and make-local-variable
since it's the authors using those functions (and friends? I don't
have a complete list) that must shoulder the burden of avoiding