openbsd-ports/mail/pine/patches/patch-pico_osdep_spell.unx
2001-09-27 16:52:40 +00:00

29 lines
973 B
Plaintext

$OpenBSD: patch-pico_osdep_spell.unx,v 1.2 2001/09/27 16:52:40 brad Exp $
--- pico/osdep/spell.unx.orig Thu Aug 27 18:57:49 1998
+++ pico/osdep/spell.unx Thu Sep 27 08:51:48 2001
@@ -85,6 +85,14 @@ spell(f, n)
setimark(0, 1);
emlwrite("Checking spelling...", NULL); /* greetings */
+ if((sp = (char *)getenv("SPELL")) == NULL)
+ sp = SPELLER;
+
+ /* This code only works with "spell", which doesn't exist, and
+ alt_speller is only set via command line -s argument. */
+ if (strstr(sp, "ispell") != NULL)
+ alt_speller = sp;
+
if(alt_speller)
return(alt_editor(1, 0)); /* f == 1 means fork speller */
@@ -92,9 +100,6 @@ spell(f, n)
emlwrite("Can't write temp file for spell checker", NULL);
return(-1);
}
-
- if((sp = (char *)getenv("SPELL")) == NULL)
- sp = SPELLER;
sprintf(cb, "( %s ) < %s", sp, fn); /* pre-use buffer! */
if((p = P_open(cb)) == NULL){ /* read output from command */