Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!bu.edu!nntp-read!jbw From: jbw@bucsf.bu.edu (Joe Wells) Newsgroups: comp.emacs Subject: Re: require & provide Message-ID: Date: 30 Sep 90 04:17:26 GMT References: <9009261610.AA01539@scenic.scenic.wa.com> Sender: news@bu.edu.bu.edu Organization: Boston University Computer Science Department Lines: 26 In-reply-to: pauld@scenic.wa.com's message of 26 Sep 90 16:10:52 GMT In article <9009261610.AA01539@scenic.scenic.wa.com> pauld@scenic.wa.com (Paul Barton-Davis) writes: ... Typical syntax is: (require 'foo) (provide 'bar) .... (elisp code for new mode etc.) Although this is almost always OK (most distributed code tends to work just fine like this), it seems conceptually wrong - 'bar has not yet been provided at the point claimed. It seems more appropriate to use (require 'foo) ... (elisp code) (provide 'bar) This way, any other packages that (require 'bar) are not corrupted by, for instance, terminating a load of bar.el, or the occasional error whilst loading. Strangely enough, "provide" and "fset" (ie. "defun") operations are undone if a failure occurs while loading the definition of an autoloaded function, but the same is not done for "require". Hmm. -- Joe Wells