1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-21 07:21:26 +02:00

Remove useless extensionName variable and trap errors at initialization.

This commit is contained in:
Kris Maglione
2010-09-23 04:38:38 -04:00
parent a66ee5a8da
commit 2b1b927ce2
+7 -3
View File
@@ -2024,10 +2024,10 @@ const Dactyl = Module("dactyl", {
// finally, read the RC file and source plugins
// make sourcing asynchronous, otherwise commands that open new tabs won't work
util.timeout(function () {
let extensionName = config.idname;
let init = services.get("environment").get(extensionName + "_INIT");
let init = services.get("environment").get(config.idname + "_INIT");
let rcFile = io.getRCFile("~");
try {
if (dactyl.commandLineOptions.rcFile) {
let filename = dactyl.commandLineOptions.rcFile;
if (!/^(NONE|NORC)$/.test(filename))
@@ -2039,7 +2039,7 @@ const Dactyl = Module("dactyl", {
else {
if (rcFile) {
io.source(rcFile.path, true);
services.get("environment").set("MY_" + extensionName + "RC", rcFile.path);
services.get("environment").set("MY_" + config.idname + "RC", rcFile.path);
}
else
dactyl.log("No user RC file found", 3);
@@ -2057,6 +2057,10 @@ const Dactyl = Module("dactyl", {
if (options["loadplugins"])
dactyl.loadPlugins();
}
catch (e) {
dactyl.reportError(e, true);
}
// after sourcing the initialization files, this function will set
// all gui options to their default values, if they have not been