all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: make-variable-buffer-local change
Date: Fri, 25 Sep 2009 10:07:49 -0700 (PDT)	[thread overview]
Message-ID: <200909251707.n8PH7nuk020712@godzilla.ics.uci.edu> (raw)
In-Reply-To: <f7ccd24b0909250932h3f80fa36ha9ae3d5421e3c6cb@mail.gmail.com> (Juanma Barranquero's message of "Fri, 25 Sep 2009 18:32:17 +0200")

Juanma Barranquero <lekktu@gmail.com> writes:

  > On Fri, Sep 25, 2009 at 18:09, Dan Nicolaescu <dann@ics.uci.edu> wrote:
  > 
  > > Can you please explain the reason for this change:
  > 
  > Sure.
  > 
  > > 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

"All packages that assign it"

  > reason ever (that I can think of) to assign it globally; it would in

It is globally assigned to nil. 

All buffers that don't set it explicitly use the global nil value.

Isn't it slightly more efficient to access global bindings than buffer
local bindings, so forcing `make-variable-buffer-local' will force this
inefficiency everywhere.

  > 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
  > welcome.

IMHO the first thing to do there is to decide if this is a problem with
uniquify, or if it's just working as expected.  (no idea here).




  parent reply	other threads:[~2009-09-25 17:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 16:09 make-variable-buffer-local change Dan Nicolaescu
2009-09-25 16:32 ` Juanma Barranquero
2009-09-25 16:50   ` Lennart Borgman
2009-09-25 16:57     ` Juanma Barranquero
2009-09-25 17:35       ` Drew Adams
2009-09-25 17:41         ` Juanma Barranquero
2009-09-25 18:06           ` Drew Adams
2009-09-25 19:09             ` Eli Zaretskii
2009-09-25 20:10               ` Drew Adams
2009-09-26  9:10                 ` Eli Zaretskii
2009-09-25 21:04               ` Stefan Monnier
2009-09-25 22:10                 ` Drew Adams
2009-09-26  1:30                   ` Stefan Monnier
2009-09-26  1:42                     ` Juanma Barranquero
2009-09-26  9:03                 ` Eli Zaretskii
2009-09-25 17:07   ` Dan Nicolaescu [this message]
2009-09-25 17:31     ` Juanma Barranquero
2009-09-25 19:46       ` Dan Nicolaescu
2009-09-25 20:16         ` Juanma Barranquero
2009-09-25 20:51           ` Dan Nicolaescu
2009-09-25 21:21             ` Juanma Barranquero
2009-09-25 21:13         ` Tom Tromey
2009-09-25 19:49     ` Stefan Monnier
2009-09-25 21:07       ` Stefan Monnier
2009-09-25 21:25         ` Dan Nicolaescu
2009-09-25 21:44           ` Tom Tromey
2009-09-25 19:50 ` Stefan Monnier

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=200909251707.n8PH7nuk020712@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /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.