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 >demand. > > 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. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel