From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: require inside functions. Date: Wed, 13 Apr 2005 11:11:21 +0200 Message-ID: <87zmw311om.fsf@xs4all.nl> References: <871x9w9dkn.fsf@xs4all.nl> <87mzsezu5f.fsf@xs4all.nl> <87hdimzou0.fsf@xs4all.nl> <87ll7uwy6m.fsf_-_@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113383481 31807 80.91.229.2 (13 Apr 2005 09:11:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2005 09:11:21 +0000 (UTC) Cc: reiner.steib@gmx.de, ding@gnus.org, emacs-devel@gnu.org, "Kim F. Storm" , snogglethorpe@gmail.com, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 13 11:11:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DLdtB-0001rU-Qa for ged-emacs-devel@m.gmane.org; Wed, 13 Apr 2005 11:10:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLdTc-0003Wb-DF for ged-emacs-devel@m.gmane.org; Wed, 13 Apr 2005 04:44:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLdSR-0003AE-Sg for emacs-devel@gnu.org; Wed, 13 Apr 2005 04:42:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLdSM-00038u-Cv for emacs-devel@gnu.org; Wed, 13 Apr 2005 04:42:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLdSL-00038W-Jo for emacs-devel@gnu.org; Wed, 13 Apr 2005 04:42:41 -0400 Original-Received: from [194.109.24.21] (helo=smtp-vbr1.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLdua-0003kf-AF; Wed, 13 Apr 2005 05:11:52 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr1.xs4all.nl (8.12.11/8.12.11) with ESMTP id j3D9BLIt021987; Wed, 13 Apr 2005 11:11:21 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DLdu5-000350-00; Wed, 13 Apr 2005 11:11:21 +0200 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Fri, 08 Apr 2005 23:38:33 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 131 X-Virus-Scanned: by XS4ALL Virus Scanner 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:35929 gmane.emacs.gnus.general:60151 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35929 Richard Stallman writes: [...] > Does this give good results? > > *** fns.c 18 Jan 2005 19:52:01 -0500 1.382 > --- fns.c 08 Apr 2005 22:22:22 -0400 > *************** > *** 66,71 **** > --- 66,72 ---- > extern int minibuffer_auto_raise; > extern Lisp_Object minibuf_window; > extern Lisp_Object Vlocale_coding_system; > + extern Lisp_Object Vloads_in_progress; > > Lisp_Object Qstring_lessp, Qprovide, Qrequire; > Lisp_Object Qyes_or_no_p_history; > *************** > *** 3444,3452 **** > CHECK_SYMBOL (feature); > > /* Record the presence of `require' in this file > ! even if the feature specified is already loaded. */ > ! LOADHIST_ATTACH (Fcons (Qrequire, feature)); > ! > tem = Fmemq (feature, Vfeatures); > > if (NILP (tem)) > --- 3445,3459 ---- > CHECK_SYMBOL (feature); > > /* Record the presence of `require' in this file > ! even if the feature specified is already loaded. > ! But not more than once in any file, > ! and not when we aren't loading a file. */ > ! if (! NILP (Vloads_in_progress)) > ! { > ! tem = Fcons (Qrequire, feature); > ! if (NILP (Fmember (tem, Vcurrent_load_list))) > ! LOADHIST_ATTACH (tem); > ! } > tem = Fmemq (feature, Vfeatures); > > if (NILP (tem)) Did you perhaps mean to use load_in_progress instead of Vloads_in_progress? Lute. Index: src/fns.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/fns.c,v retrieving revision 1.384 diff -c -r1.384 fns.c *** src/fns.c 10 Apr 2005 19:02:24 -0000 1.384 --- src/fns.c 13 Apr 2005 08:42:48 -0000 *************** *** 66,72 **** extern int minibuffer_auto_raise; extern Lisp_Object minibuf_window; extern Lisp_Object Vlocale_coding_system; ! extern Lisp_Object Vloads_in_progress; Lisp_Object Qstring_lessp, Qprovide, Qrequire; Lisp_Object Qyes_or_no_p_history; --- 66,72 ---- extern int minibuffer_auto_raise; extern Lisp_Object minibuf_window; extern Lisp_Object Vlocale_coding_system; ! extern int load_in_progress; Lisp_Object Qstring_lessp, Qprovide, Qrequire; Lisp_Object Qyes_or_no_p_history; *************** *** 3460,3466 **** even if the feature specified is already loaded. But not more than once in any file, and not when we aren't loading a file. */ ! if (! NILP (Vloads_in_progress)) { tem = Fcons (Qrequire, feature); if (NILP (Fmember (tem, Vcurrent_load_list))) --- 3460,3466 ---- even if the feature specified is already loaded. But not more than once in any file, and not when we aren't loading a file. */ ! if (load_in_progress) { tem = Fcons (Qrequire, feature); if (NILP (Fmember (tem, Vcurrent_load_list))) Index: src/lread.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/lread.c,v retrieving revision 1.329 diff -c -r1.329 lread.c *** src/lread.c 10 Apr 2005 00:28:37 -0000 1.329 --- src/lread.c 13 Apr 2005 08:42:51 -0000 *************** *** 1,6 **** /* Lisp parsing and input streams. Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1997, 1998, ! 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. --- 1,6 ---- /* Lisp parsing and input streams. Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1997, 1998, ! 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. *************** *** 193,199 **** /* A list of file names for files being loaded in Fload. Used to check for recursive loads. */ ! Lisp_Object Vloads_in_progress; /* Non-zero means load dangerous compiled Lisp files. */ --- 193,199 ---- /* A list of file names for files being loaded in Fload. Used to check for recursive loads. */ ! static Lisp_Object Vloads_in_progress; /* Non-zero means load dangerous compiled Lisp files. */