1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:17:59 +01:00

Create 'group's for sourced scripts.

--HG--
branch : groups
This commit is contained in:
Kris Maglione
2011-02-05 05:18:57 -05:00
parent f06e7075ee
commit 020ad98197
3 changed files with 74 additions and 49 deletions

View File

@@ -1040,7 +1040,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
dir.readDirectory(true).forEach(function (file) {
if (file.isFile() && loadplugins.getKey(file.path) && !(file.path in dactyl.pluginFiles)) {
try {
io.source(file.path, false);
io.source(file.path);
dactyl.pluginFiles[file.path] = true;
}
catch (e) {
@@ -2075,14 +2075,14 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (dactyl.commandLineOptions.rcFile) {
let filename = dactyl.commandLineOptions.rcFile;
if (!/^(NONE|NORC)$/.test(filename))
io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim
io.source(io.File(filename).path, { group: contexts.user });
}
else {
if (init)
dactyl.execute(init);
else {
if (rcFile) {
io.source(rcFile.path, false);
io.source(rcFile.path, { group: contexts.user });
services.environment.set("MY_" + config.idName + "RC", rcFile.path);
}
else
@@ -2092,7 +2092,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (options["exrc"] && !dactyl.commandLineOptions.rcFile) {
let localRCFile = io.getRCFile(io.cwd);
if (localRCFile && !localRCFile.equals(rcFile))
io.source(localRCFile.path, false);
io.source(localRCFile.path, { group: contexts.user });
}
}