} else {
mmhpath = concat(mypath, "/", mmhdir, NULL);
if (stat(mmhpath, &st) == -1 || (st.st_mode & S_IFDIR) == 0) {
- adios(NULL, "Doesn't look like mmh is set up for your account. Run `install-mh' to do so.");
+ adios(NULL, "Doesn't look like mmh is set up for your account. Run `mmh' to do so.");
}
}
lkfclose(ib, ctxpath);
}
+ /* Set editor */
+ if (!(cp = getenv("MMHEDITOR")) || !*cp) {
+ if (!(cp = context_find("editor")) || !*cp) {
+ if (!(cp = getenv("VISUAL")) || !*cp) {
+ if (!(cp = getenv("EDITOR")) || !*cp) {
+ cp = defaulteditor;
+ }
+ }
+ }
+ }
+ defaulteditor = cp;
+
/* Set pager */
if (!(cp = getenv("MMHPAGER")) || !*cp) {
if (!(cp = context_find("pager")) || !*cp) {