]> diplodocus.org Git - nmh/blobdiff - sbr/geteditor.c
fmt_new.c: Move interface to own file.
[nmh] / sbr / geteditor.c
index c8b9986b04830b185a303431c0177ac272df8118..3b472ec1233aeba79b4471cf30c6d764cb5c3a1b 100644 (file)
@@ -1,13 +1,14 @@
-/*
- * geteditor.c -- Determine the default editor to use
+/* geteditor.c -- Determine the default editor to use
  *
  * This code is Copyright (c) 2013, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/utils.h>
+#include "h/mh.h"
+#include "geteditor.h"
+#include "context_find.h"
+#include "h/utils.h"
 
 static char *default_editor = NULL;
 
@@ -21,8 +22,8 @@ get_default_editor(void)
 
     if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
        !(str = getenv("EDITOR"))) {
-       str = DEFAULT_EDITOR;
+       str = "vi";
     }
 
-    return (default_editor = str);
+    return default_editor = str;
 }