]>
diplodocus.org Git - nmh/blob - sbr/geteditor.c
c8b9986b04830b185a303431c0177ac272df8118
2 * geteditor.c -- Determine the default editor to use
4 * This code is Copyright (c) 2013, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
12 static char *default_editor
= NULL
;
15 get_default_editor(void)
20 return default_editor
;
22 if (!(str
= context_find("editor")) && !(str
= getenv("VISUAL")) &&
23 !(str
= getenv("EDITOR"))) {
27 return (default_editor
= str
);