[CC aspell-devel, please do also] On Wed, 18 Sep 2002, Christoph Hintermüller wrote:
> > 2) Allow setting of options for the loadable filters where the options are > > of the form "<filter>-<option". This can be done in one of two ways. > > > > 1) Automatically allow all options of the form *-* to be set even if > > the option is not known. When the option is retrieved, > > and after the filter module is loaded the config class will check > > if it is valid. > > > > 2) When an option <a>-<b> is set and is not known by the config > > class it should look for a special data with its name based > > on <a>. If it can find one it should load the list and then > > check if the option is valid. If it can't find one it will > > report that the key is not known. > > > > #1 is the easiest but suboptimal because 1) the config class will have > > to accept any options with a dash in them and 2) if the value is invalid > > it will only be reported when the option is retrieved, not when the > > option is set. > > > > #2 would be the best but it would be more difficult to > > pull off. Part of the problem is that when config sees an option of the > > form <a>-<b> it is diffacult for it to tell if it is corresponds to the > > option "<a>-<b>" or if it corresponds to option <b> for module <a>. > 1) are there at all options of "<a>-<b>" Yes lots. See common/config.cpp > 2) do not allow names for filters which conflict with option name > <a> is either first part of option or filter name By this do you mean if a filter is named foo than do not allow any options which start with "foo-" this way all options starting with "foo-" must belong to filter foo? If so, this is already done. But the problem is determining if option "barr-bla" is option "bla" for filter "barr" or option "barr-bla"? What if the user meant "bar-bla" which is a valid option? The only way to know for shore is to see if filter "barr" exists and if so what options it has. > 3) prefix filter options "f[ilter]-<a>-<b>" > 4) introduce "--" as separator between aspell options and filter options > aspell -<ao> -<ao>-<bo> -- -<af> -<af>-<bf> > where "<ao>" and "<ao>-<bo>" are options for aspell > and all options following -- are passe to the option hanling of the > loaded filters > this would be "<af>" and "<af>-<bf>" Off the two I like the idea of using "--" as a separator. However that may cause compatibility problems with existing filters. > > 2-3 would allow implicit filter loading > means if <a> could be uniquely associated with a known filter the filter > the filter could be loaded even if the filter is not mentioned at all > (only bad if user mispelled aspell option) > > 2-4 without implicit loading feature in 2-3 immediate error detection is > possible as <a>-<b> neither would match any valid aspell option nor any > option for filter <a> as the filter itselve is unknown > after completing processing Configfile, Environment and Commandline I think the option I like best is too use two dashes for filter options ie "<filter name>--<filter option>" --- http://kevin.atkinson.dhs.org _______________________________________________ Aspell-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/aspell-devel