[Top][All Lists]

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

Re: A few questions about desktop.el

From: Lars Hansen
Subject: Re: A few questions about desktop.el
Date: Tue, 09 Aug 2005 09:12:45 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Juanma Barranquero wrote:

> - Why is desktop-locals-to-save automatically buffer local? I can
>understand why should it be buffer-local, but automatically? I'd think
>that most users/modes are simply going to add to the default value of
>the variable. Or am I missing something?
I guess it does not have to be automatically buffer local. But I am not
shure what the advantages/disadvantages of either choice are.

>I think it would be better to have just one list
>(accepting regexps) and then combine them into a single regexp on
I agree. I will change that.

>Wouldn't suffice to add the requeriment that when a mode wants to add
>to `desktop-*-mode-handlers', the added function *must* be autoloaded?
No. Desktop does not know that there *is* a handler since it may not
have been added to `desktop-*-mode-handlers' yet.

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.
Therefore I want foo to not only define its own desktop handler, but to
add it to the variable `desktop-*-mode-handlers' as well. But then
desktop has to load foo before checking for a handler. 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.

reply via email to

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