Call context_read() before getting filter in repl
authorm@mmmmarascio.xyz <m@mmmmarascio.xyz>
Sun, 13 Mar 2016 15:49:35 +0000 (08:49 -0700)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sun, 13 Mar 2016 19:04:02 +0000 (20:04 +0100)
The manual page of repl says "[i]f a file named `mhl.reply' exists in the
user's mmh directory, it will be used instead of [the default form file]".
Now this behavior is implement.

uip/repl.c

index 71ae98e..f1e4bcc 100644 (file)
@@ -145,14 +145,14 @@ main(int argc, char **argv)
        FILE *in;
        int buildsw = 0;
 
        FILE *in;
        int buildsw = 0;
 
-       filter = getcpy(etcpath(mhlreply));
-
        setlocale(LC_ALL, "");
        invo_name = mhbasename(argv[0]);
 
        /* read user profile/context */
        context_read();
 
        setlocale(LC_ALL, "");
        invo_name = mhbasename(argv[0]);
 
        /* read user profile/context */
        context_read();
 
+       filter = getcpy(etcpath(mhlreply));
+
        arguments = getarguments(invo_name, argc, argv, 1);
        argp = arguments;
 
        arguments = getarguments(invo_name, argc, argv, 1);
        argp = arguments;