Re: Language module support added
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Adriaan de Groot wrote: > On Thursday 25 September 2003 21:40, Bram Moolenaar wrote: > > - The ":import" command searches various "modules" directories for a > > module. All found modules are loaded in the same scope. The modules > > must take care of not defining things that have already been done by > > checking for the did_import_<name> variable. > > OK. The collision in namespace between module names and variables is a > pain, though, since it means thinking up some contorted module name > for the libtool module (libtoolmod is what i've settled on, since it's > not a language module which should be named *lang). Did you see my suggestion to use "m_<module-name>" for the scope? Thus it would be "m_d" for the D language and "m_libtool" for the libtool module. I already have a patch for this, waiting for a positive response before I send it out. > In addition, having to do the did_import_ thing manually in the module > itself feels rather silly .. since it's obvious AAP _could_ set that > variable itself. I also suggested a solution for this: Only load the first module found in the list of "modules" directories, then load all recipes found in the "modules2" directories. The first is to define the module, the second to tune a few things without making a copy of a module. > Is there any situation you can think of where multiple module imports > would be useful? What do you mean by "multiple module imports"? Importing the same module more than once? -- Those who live by the sword get shot by those who don't. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf