From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Hansen Newsgroups: gmane.emacs.devel Subject: Re: A few questions about desktop.el Date: Tue, 09 Aug 2005 09:12:45 +0200 Message-ID: <42F8576D.8070200@soem.dk> References: <42F7715F.1070508@soem.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123577624 16081 80.91.229.2 (9 Aug 2005 08:53:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2005 08:53:44 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 09 10:53:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2Pr8-0007pa-Er for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2005 10:53:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2PoE-0006tZ-W0 for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2005 04:50:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2Oj8-0003EV-1Q for emacs-devel@gnu.org; Tue, 09 Aug 2005 03:40:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2OiC-0002w5-Cd for emacs-devel@gnu.org; Tue, 09 Aug 2005 03:39:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2OdA-0001l4-8o for emacs-devel@gnu.org; Tue, 09 Aug 2005 03:34:36 -0400 Original-Received: from [212.99.225.245] (helo=odin.broadcom.dk) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E2OVr-00040i-Gg; Tue, 09 Aug 2005 03:27:03 -0400 Original-Received: from pppoe3-ves.broadcom.dk ([212.99.255.42] helo=[10.17.1.154]) by odin.broadcom.dk with esmtp (Exim 4.24; FreeBSD) id 1E2OE7-000LYm-BG; Tue, 09 Aug 2005 09:08:43 +0200 User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en Original-To: Juanma Barranquero In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41751 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41751 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.