From: "Ami Fischman" <ami@fischman.org>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: crazy interaction between buffer-locality and function-locality of variables
Date: Sun, 2 Nov 2008 09:43:15 -0800 [thread overview]
Message-ID: <9aa0cfde0811020943l24121f8cj78bbf82709036f9d@mail.gmail.com> (raw)
In-Reply-To: <jwvk5bmt6ms.fsf-monnier+emacs@gnu.org>
> > 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
> let-bound).
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
collisions.
-a
next prev parent reply other threads:[~2008-11-02 17:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-02 3:34 crazy interaction between buffer-locality and function-locality of variables Ami Fischman
2008-11-02 16:57 ` Stefan Monnier
2008-11-02 17:43 ` Ami Fischman [this message]
2008-11-02 20:05 ` Stefan Monnier
2008-11-02 20:31 ` crazy interaction between buffer-locality and function-localityof variables Drew Adams
2008-11-02 23:19 ` crazy interaction between buffer-locality and function-locality of variables Richard M. Stallman
2008-11-02 23:59 ` Ami Fischman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9aa0cfde0811020943l24121f8cj78bbf82709036f9d@mail.gmail.com \
--to=ami@fischman.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.