emacs-devel
[Top][All Lists]
Advanced

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

Re: A few questions about desktop.el


From: Juanma Barranquero
Subject: Re: A few questions about desktop.el
Date: Tue, 9 Aug 2005 10:49:21 +0200

On 8/9/05, Lars Hansen <address@hidden> wrote:

> I guess it does not have to be automatically buffer local. But I am not
> shure what the advantages/disadvantages of either choice are.

Well, the reason `make-local-variable' and
`make-variable-buffer-local' both exists is, I think, that in some
circumstances the default value of the variable is gonna weight more
than local changes (i.e, the local changes are going to be few and far
between), and in other cases the variable is going to have frequent
buffer-local modifications. Using the latter style when the former
works is not "bad", but it's a bit wasteful.

In this case, I think the former case is much more frequent; the user,
or the mode programmer, can always use `make-local-variable' to force
their way when a really local value is needed.

> My motive is to make desktop as independent of other modules as
> possible. I want it to be possible to add or change module foo without
> having to change desktop, even if foo requires special desktop handling.

Yes, that's a worthwhile goal.

> But how can
> desktop find out what file to load? It knows the name of the mode (major
> or minor), so if the mode function is autoloaded, it can find the file
> name that way.

OK, I see now.

-- 
                    /L/e/k/t/u




reply via email to

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