unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lute Kamstra <Lute.Kamstra.lists@xs4all.nl>
Cc: reiner.steib@gmx.de, ding@gnus.org, emacs-devel@gnu.org,
	"Kim F. Storm" <storm@cua.dk>,
	snogglethorpe@gmail.com, miles@gnu.org
Subject: Re: require inside functions.
Date: Wed, 13 Apr 2005 11:11:21 +0200	[thread overview]
Message-ID: <87zmw311om.fsf@xs4all.nl> (raw)
In-Reply-To: <E1DK6np-0007T4-9p@fencepost.gnu.org> (Richard Stallman's message of "Fri, 08 Apr 2005 23:38:33 -0400")

Richard Stallman <rms@gnu.org> 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.  */

  parent reply	other threads:[~2005-04-13  9:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1DGYNu-00038g-00@quimby.gnus.org>
     [not found] ` <yotly8c5jpi2.fsf@jpl.org>
2005-03-31 11:27   ` Changes in calendar/time-date.el (was: CVS update of gnus/lisp (4 files)) Reiner Steib
2005-03-31 12:20     ` Miles Bader
2005-03-31 12:58     ` Changes in calendar/time-date.el Lute Kamstra
2005-03-31 22:52       ` Miles Bader
2005-04-01  4:10       ` Richard Stallman
2005-04-04 10:25       ` Reiner Steib
2005-04-04 10:57         ` Lute Kamstra
2005-04-04 12:09           ` Reiner Steib
2005-04-04 12:52             ` Lute Kamstra
2005-04-04 17:20               ` Reiner Steib
2005-04-04 19:50                 ` Stefan Monnier
2005-04-05  7:14                 ` Kim F. Storm
2005-04-05  9:33                   ` Miles Bader
2005-04-05 10:06                     ` Kim F. Storm
2005-04-07 12:47                       ` require inside functions. (was: Changes in calendar/time-date.el) Lute Kamstra
2005-04-07 21:45                         ` Kim F. Storm
2005-04-08  0:12                           ` require inside functions Miles Bader
2005-04-08  0:45                             ` Stefan Monnier
2005-04-08  2:09                               ` Miles Bader
2005-04-08  0:21                           ` Stefan Monnier
2005-04-08  3:22                         ` require inside functions. (was: Changes in calendar/time-date.el) Richard Stallman
2005-04-08  8:12                           ` Kim F. Storm
2005-04-09  3:38                             ` require inside functions. (was: Changes in Richard Stallman
2005-04-09  9:30                               ` require inside functions Lute Kamstra
2005-04-10  1:55                                 ` Richard Stallman
2005-04-13  9:11                               ` Lute Kamstra [this message]
2005-04-15  2:44                                 ` Richard Stallman
2005-04-15  9:23                                   ` Lute Kamstra
2005-04-08  8:16                           ` David Kastrup
2005-04-05 13:54                 ` Changes in calendar/time-date.el Lute Kamstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zmw311om.fsf@xs4all.nl \
    --to=lute.kamstra.lists@xs4all.nl \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=reiner.steib@gmx.de \
    --cc=snogglethorpe@gmail.com \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).