Re: eval-after-provision
Brian Palmer <[email protected]> 31 Mar 2004 15:57:27 -0800
| Newsgroups | gmane.emacs.xemacs.design |
|---|---|
| Message-ID | <[email protected]> |
Jeff Mincy <[email protected]> writes: > On 24 Mar 2004, [email protected] wrote: > > > I've been working for a while with a feature 'eval-after-provision' in > > my init file which seems like it'd be a useful feature to integrate > > into xemacs. From the comments in the source for eval-after-load and > > eval-when-feature, it seems like others agree with me. To summarize, > > the trouble with e-a-l and e-w-f is that they work with > > after-load-alist. However, there are different names under which a > > file can be loaded, which makes an alist a problematic structure to > > use. Furthermore, in theory features provide for filename > > independence, but without a mechanism for evaluating forms after a > > feature has been provided, a user has to be aware of what files are > > going to be loaded that could provide the feature. > > Many el files do the provides at the top. Consider what happens > when you load a file that does the provide first. Interesting. I don't think that's *tremendously* common; I didn't remember ever seeing one do that. One quick perl script later, on the lisp dir of xemacs-21.4.6, shows only 10 out of hte 259 .el files in there use provide early on in their files. I'm sort of attracted to the simpler case, but since both you and Stephen Turnbull think it should be handled, it makes sense to go the more complicated route. > > This is fairly straightforward; but it's sort of nasty, since it's > > advising provide. It seems like it might be better to modify provide > > in fns.c directly. I'd be interested in any feedback, of course. > > You may want to (re)consider living with eval-after-load. > > There are more subtleties than are immediately obvious when > implementing this functionality. > > I have implemented similar functionality called after-provided which > is attached. It's clear you've thought a lot more about the subtleties than I have. May I ask what your experience has been with after-provided? Do you think it addresses the problem satisfactorily? -- I'm awfully glad I'm a Beta, because I don't work so hard.