]> diplodocus.org Git - nmh/commitdiff
geteditor.c: Hard-code the default, "vi".
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 2 Sep 2017 23:22:18 +0000 (00:22 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 2 Sep 2017 23:22:18 +0000 (00:22 +0100)
It was the only use of the DEFAULT_EDITOR macro, so that can be deleted.

h/nmh.h
sbr/geteditor.c

diff --git a/h/nmh.h b/h/nmh.h
index 07f7240b1ca1b28a1ce90203ec653635dcba66c1..7336c24b3e4180d26841f0fa61a1c4da658f74f3 100644 (file)
--- a/h/nmh.h
+++ b/h/nmh.h
@@ -83,4 +83,3 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream);
  */
 
 #define DEFAULT_PAGER "more"
-#define DEFAULT_EDITOR "vi"
index 80602af34ad479d87dddf9cc56f147a7c690f95e..9889a5e39a31290680205e0969fa0268eab7d44f 100644 (file)
@@ -20,7 +20,7 @@ get_default_editor(void)
 
     if (!(str = context_find("editor")) && !(str = getenv("VISUAL")) &&
        !(str = getenv("EDITOR"))) {
-       str = DEFAULT_EDITOR;
+       str = "vi";
     }
 
     return (default_editor = str);