} 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.");
}
}
}
/*
- ** context is NULL if context_foil() was called to disable use
- ** of context. We also support users setting explicitly setting
+ ** context is NULL if the use of the context was diabled.
+ ** We also support users setting explicitly setting
** MMHC to /dev/null. (If this wasn't special-cased then the
** locking would be liable to fail.)
*/
readconfig((struct node **) 0, ib, cp, 1);
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) {
+ if (!(cp = getenv("PAGER")) || !*cp) {
+ cp = defaultpager;
+ }
+ }
+ }
+ defaultpager = cp;
}