Trojan horse FIX for Rnmail and Pnews

Guy Harris guy at auspex.UUCP
Tue Dec 6 18:27:38 AEST 1988


 >*** 200,206 ****
...
 >! 	${VISUAL-${EDITOR-$defeditor}} $tmpart $oldart
...
 >--- 200,206 ----
...
 >! 	${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart
...

Sorry, wrong answer.

*I* set EDITOR to "(appropriate directory)/emacs", and it wouldn't like
"+set nomodeline" at all.

For that matter, I don't remember whether the older (e.g., 4.2BSD)
versions of "vi" had a "nomodeline" option.

And, even though the S5R3 one has an option like that, it calls it
"modelines", not "modeline", sigh.  (Since I think AT&T's "vi" derives
from one of around 4.2BSD vintage, this suggests that there might not
have been such an option in the 4.2BSD one, and that AT&T and Berkeley
added it independently.)

If you insist on sticking "+set nomodeline" here, rather than in the
user's ".exrc" where it belongs (there are plenty of other files that
could contain modelines, and that could really screw up things; at least
one file that often contains the magic nasty sequences is
"/etc/passwd"), make sure 1) it *only* does so if the last component of
the editor's name is "ex" or "vi" and 2) that it's easily configurable,
so you can support

	1) 4.3BSD systems with "modeline"

	2) S5R3 systems with "modelines"

	3) other systems with neither



More information about the Comp.unix.wizards mailing list