From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Fload does not set the `autoload' property Date: Thu, 11 Oct 2007 22:46:38 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1192157371 23624 80.91.229.12 (12 Oct 2007 02:49:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 02:49:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 04:49:21 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IgAaW-0004j4-9k for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 04:49:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgAaQ-0000oi-68 for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 22:49:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgAXw-0006yX-2M for emacs-devel@gnu.org; Thu, 11 Oct 2007 22:46:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgAXv-0006xs-3o for emacs-devel@gnu.org; Thu, 11 Oct 2007 22:46:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgAXu-0006xh-ON for emacs-devel@gnu.org; Thu, 11 Oct 2007 22:46:38 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IgAXu-0002z7-Fa for emacs-devel@gnu.org; Thu, 11 Oct 2007 22:46:38 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IgAXu-0004ey-5Q; Thu, 11 Oct 2007 22:46:38 -0400 In-reply-to: (lekktu@gmail.com) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:80690 Archived-At: There is a deliberate reason for treating autoloading differently from calls to `load' or `require'. Calling an autoload function is a request to use that function, not a request to load the file. If loading the file fails to define the function that you tried to call, then Emacs did not do what you asked for. So we put the function back as it was. By contrast, calling `load' and `require' is an explicit request to load the file. Whatever the file does, that's what you asked for. So there is no particular need to try to undo anything that the file did. However, it might be a bug that this affects the `autoload' property. Maybe we should set the `autoload' property for every definition of a function that was previously autoloaded. This would probably mean setting the `autoload' property in Ffset instead of in do_autoload. If we change this, we should consider it a bug fix, so we should do it now and fix it in Emacs 22.2. Would someone like to try implementing that change? Stefan wrote: Similarly, if your file contains 2 autoloads (foo1 and foo2), and the file gets autoloaded via foo1, only foo1's autoload gets saved in the `autoload' property. That surprises me -- the code seems to do this for every autoloaded function defined by the file, if it was loaded by do_autoload.