[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make-variable-buffer-local change

From: Juanma Barranquero
Subject: Re: make-variable-buffer-local change
Date: Fri, 25 Sep 2009 18:32:17 +0200

On Fri, Sep 25, 2009 at 18:09, Dan Nicolaescu <address@hidden> wrote:

> Can you please explain the reason for this change:


> In most cases it is better to use `make-local-variable',
> which makes a variable local in just one buffer.

That's true, in the case where a variable has local and non-local
uses. The warning that you quote is intended to keep people from
blindly making variables automatically buffer-local as soon as they
realize that the variable *could* sometimes be useful as buffer-local.
That's a good suggestion.

However, `list-buffers-directory' is *always* used as buffer-local.
All packages that assign it make it buffer-local first. There's no
reason ever (that I can think of) to assign it globally; it would in
fact break some packages, like ibuffer.el or mouse.el. Certainly every
buffer that uses it will want to have its own value. I'd go to far as
betting that any assignment of `list-buffers-directory' that's not
buffer-local is likely an error. So making it automatic is simpler and

At least, that's my take on it.

BTW, I did this patch while investigating #3224. uniquify has code to
deal with buffers that assign `list-buffers-directory', but it is
doing a bad job of it. I cannot think of a clean way to fix it that
does not involve changing more code than I would like, though. Ideas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]