frawor / doc / frawor.txt

Diff from to

File doc/frawor.txt

 2.1. Functions                                              *frawor-functions*
-FraworRegister({version}, {sid}, {file}, {dependencies}, {oneload}, {g})
+FraworRegister({version}, {sid}, {file}, {dependencies}, {g})
         Registers plugin sourced from {file} that has given {version} (see 
-        |frawor-t-version|; {version} must have at least two components). If 
-        {oneload} is true, then plugin is considered loaded when it is 
-        registered, otherwise it will be sourced for the second time when 
-        required. {dependencies} argument is a dictionary that contains pairs 
+        |frawor-t-version|; {version} must have at least two components). 
+        {dependencies} argument is a dictionary that contains pairs 
         {{depplid}: {depversion}} where each {depversion} must have at least 
         one component. {g} argument must contain dictionary with script-local 
         variable (s:, see |internal-variables|, a paragraph just after a list 
         type         First component of plugin file path that is not part of 
                      runtimepath (or `/unknown' if frawor failed to detect 
-        It sets s:_pluginloaded to 1 for oneload plugins and 0 for other. Also 
-        see |s:_loading|.
+        It sets s:_pluginloaded to 1.
         If some key in {dependencies} dictionary starts with `@', then it is 
         you may use s:_sfile variable to tell frawor what should be sourced to 
         load plugin.
-frawor#Setup({version}, {dependencies}, {oneload})            *frawor#Setup()*
+frawor#Setup({version}, {dependencies})                       *frawor#Setup()*
         If |:execute|d, does some common setup:
         1. If {version} or some value in {dependencies} is a dot-separated 
            list of numbers, then it is transformed into |List| of |Number|s. 
         4. Creates s:_sid variable containing your plugin script id.
         5. If s:_sfile variable does not exist, sets it to plugin filename.
         6. Calls |FraworRegister()|, passing it transformed {version}, s:_sid, 
-           s:_sfile, transformed {dependencies}, {oneload} and s:.
+           s:_sfile, transformed {dependencies} and s:.
         Example: >
-            execute frawor#Setup([0, 0], {"@frawor": [0, 0]}, 0)
+            execute frawor#Setup([0, 0], {"@frawor": [0, 0]})
 <       You may replace [0, 0] here with "0.0", but remember that it is 
         frawor#Setup extension, it won't work with FraworRegister.
         Note: you must |:execute| frawor#Setup, not |:call| it.
                    will be ignored for plugins that do not specify feature 
                    definer in dependencies.
+        Sequence in which feature keys are used:
+        0. Loading all dependencies.
+        1. (In case using |frawor-f-require|) running |frawor-fk-depadd|.
+        2. Populating feature dictionary using |frawor-fk-init|.
+        3. Running |frawor-fk-register|.
+        4. Constructing functions from |frawor-fk-cons|.
+        5. Running |frawor-fk-load|.
+        6. (While unloading) running |frawor-fk-unloadpre|.
+        7. (While unloading) unloading dependencies and the plugin itself, 
+           |frawor-fk-unload| is called just before unloading of each plugin, 
+           |s:_unload| just after |frawor-fk-unload|.
 3.2. @/functions features                               *frawor-f-@/functions*
         isfiletype    Bool, true if plugin is devoted to some filetype 
                       (determined by chekcing whether plugin id starts with 
                       ftplugin/, syntax/ or indent/).
-        oneload       Bool, true if plugin should be loaded only once.
         file          Path to plugin file ({file} argument to 
                       |FraworRegister()| for non-anonymous plugins, |s:_sfile| 
                       or 0 for anonymous plugins).
 *s:_pluginloaded*  @frawor          Integer. Is set to 0 after plugin is 
                                   registered and then to 1 after plugin is 
-*s:_loading*       @frawor          Integer. Is set to 1 when frawor started 
-                                  to load non-oneload plugin and unset after 
-                                  plugin was loaded.
 *s:_frawor*        @frawor          Dictionary. Is set by |FraworRegister()|.
 *s:_messages*      @frawor          Dictionary that contains strings as 
                                   values. Required for |frawor-f-warn| and 
     0.1: Added |frawor-f-require| and |frawor-fk-depadd|
-    0.2: Added |s:_loading| variable
+    0.2: Added s:_loading variable
     0.3: Added isftplugin key to |frawor-t-plugdict|,
          adjusted the way plugin type is determined.
+    1.0: Removed twoload feature and s:_loading variable.
     0.1: Added possibility to specify dictionaries in `strfunc' and `func'