The priority order is: MMHEDITOR (env) > Editor (profile) > VISUAL (env)
EDITOR (env) > vi
.RS 5
Defines the editor to be used by the commands
.BR comp ,
.RS 5
Defines the editor to be used by the commands
.BR comp ,
.BR forw ,
and
.BR repl .
.BR forw ,
and
.BR repl .
+This profile entry overrides the $VISUAL and $EDITOR environment variables,
+but gets overridden by the $MMHEDITOR environment variabel.
(profile, default: vi)
.RE
.PP
(profile, default: vi)
.RE
.PP
to display message bodies (or message parts) of type text/plain.
This profile entry overrides the $PAGER environment variable, but gets
overridden by the $MMHPAGER environment variable.
to display message bodies (or message parts) of type text/plain.
This profile entry overrides the $PAGER environment variable, but gets
overridden by the $MMHPAGER environment variable.
+(profile, default: more)
the default shell to run
.RE
.PP
the default shell to run
.RE
.PP
+.B $MMHEDITOR
+.br
+.B $VISUAL
+.br
+.B $EDITOR
+.RS 5
+These variables (in descending priority) define the default editor to use.
+.RE
+.PP
.B $MMHPAGER
.br
.B $PAGER
.B $MMHPAGER
.br
.B $PAGER
+ /* 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) {
/* Set pager */
if (!(cp = getenv("MMHPAGER")) || !*cp) {
if (!(cp = context_find("pager")) || !*cp) {
if ((cp = context_find(cp)) != NULL)
*ed = cp;
}
if ((cp = context_find(cp)) != NULL)
*ed = cp;
}
- if (*ed == NULL && (*ed = context_find("editor")) == NULL)
- *ed = defaulteditor;
if (nedit) {
unputenv("mheditor");
} else {
if (nedit) {
unputenv("mheditor");
} else {
- m_putenv("mheditor", ed ? ed : (ed = context_find("editor")) ?
- ed : defaulteditor);
+ m_putenv("mheditor", ed ? ed : defaulteditor);
}
snprintf(buffer, sizeof(buffer), "%d", use);
m_putenv("mhuse", buffer);
}
snprintf(buffer, sizeof(buffer), "%d", use);
m_putenv("mhuse", buffer);