all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ami Fischman" <ami@fischman.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: crazy interaction between buffer-locality and function-locality of variables
Date: Sun, 2 Nov 2008 15:59:33 -0800	[thread overview]
Message-ID: <9aa0cfde0811021559l3c596ed3rc0d6c5896e275bfc@mail.gmail.com> (raw)
In-Reply-To: <E1KwmDu-0001Hz-9b@fencepost.gnu.org>

>    Is the behavior of binding function arguments variables subject to the
>    locality of the current buffer at function call time intentional?
> That's a confusing way to describe things.

I intentionally described the behavior I observed in a way as
confusing as I found the behavior to be, hoping to draw attention to
the deficiency I considered in the behavior.

> The current buffer
> when the function is called has no direct effect on the function.
> What does have an effect is switching buffers within the function.

This distinction lacks a difference to me.  Buffer-switching is a
standard idiom of elisp and normally considered an implementation
detail of a function, not part of its external contract.  If including
buffer-switching in a function's code unbinds variables bound in that
function then that promotes the presence of buffer-switching from
implementation detail to externally-visible effect.  Put another way,
a function that uses buffer-switching is always at the mercy of the
buffers in which it is invoked, to avoid making local variables with
the same names as the function's arguments or let-bound variables.
This is what I was hoping was unintentional and fixable, though you
and Stefan have now told me that it is the lesser evil (and by
implication here to stay).

> We should probably change the name of that variable in Gnus.
> to something like `gnus-timestamp'.

I have posted a request for something similar to the gnus mailing list:
http://thread.gmane.org/gmane.emacs.gnus.general/67732

-a




      reply	other threads:[~2008-11-02 23:59 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
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 [this message]

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=9aa0cfde0811021559l3c596ed3rc0d6c5896e275bfc@mail.gmail.com \
    --to=ami@fischman.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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.