diff --git a/common/content/dactyl.js b/common/content/dactyl.js index a9605542..ab54687f 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -739,8 +739,9 @@ const Dactyl = Module("dactyl", { dactyl.assert(dir.isReadable(), "E484: Can't open file " + dir.path); dactyl.log("Sourcing plugin directory: " + dir.path + "...", 3); + let loadplugins = options.get("loadplugins"); dir.readDirectory(true).forEach(function (file) { - if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in dactyl.pluginFiles)) { + if (file.isFile() && loadplugins.getKey(file.path) && !(file.path in dactyl.pluginFiles)) { try { io.source(file.path, false); dactyl.pluginFiles[file.path] = true; @@ -1287,8 +1288,8 @@ const Dactyl = Module("dactyl", { "string", "intro"); options.add(["loadplugins", "lpl"], - "Load plugin scripts when starting up", - "boolean", true); + "A regex list that defines which plugins are loaded at startup and via :loadplugins", + "regexlist", "\\.(js|vimp)$"); options.add(["titlestring"], "Change the title of the window", diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml index 777b7d89..2a0f8e6f 100644 --- a/common/locale/en-US/options.xml +++ b/common/locale/en-US/options.xml @@ -883,15 +883,17 @@ 'nolpl' 'lpl' 'noloadplugins' 'loadplugins' 'loadplugins' 'lpl' - boolean - on + regexlist + \.(js|vimp)$

- Load plugin scripts when starting up. When on, yet unloaded plugins - are automatically loaded after the &dactyl.name;rc file has been - sourced. To load plugins earlier, use the :loadplugins - command within &dactyl.name;rc. + A regular expression list that defines which plugins are loaded at + startup and via :loadplugins. The first item to match is + the one that takes effect. If no items match, the file is not + loaded. Setting this to a blank value effectively disables plugin + loading. See also :runtime.

+ :set loadplugins^=!foobar-plugin
diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS index c6913fc5..3759507b 100644 --- a/pentadactyl/NEWS +++ b/pentadactyl/NEWS @@ -20,6 +20,8 @@ - Supports reverse incremental search. * IMPORTANT: Plugins are now loaded from the 'plugins/' directory in 'runtimepath' rather than 'plugin/'. + * IMPORTANT: 'loadplugins' is not a regexlist option rather than + a boolean. * IMPORTANT: Single quotes no longer treat \s specially. I.e., 'fo\o''bar' ≡ fo\o'bar * IMPORTANT: 'cdpath' and 'runtimepath' no longer treat ‘,,’ diff --git a/pentadactyl/TODO b/pentadactyl/TODO index f4e56397..bb40b9a1 100644 --- a/pentadactyl/TODO +++ b/pentadactyl/TODO @@ -41,7 +41,6 @@ BUGS: - The MOW shouldn't close when executing hints and ;F isn't working. FEATURES: -9 Make 'loadplugins' a regexlist 9 Add quoting help tag 9 JavaScript completer: show function parameter spec 9 Fix the arbitrary distinction between 'hinttags' and