diff -Nru nano-1.3.8/doc/man/nano.1 nano-1.3.8-mine/doc/man/nano.1 --- nano-1.3.8/doc/man/nano.1 2005-06-27 01:01:31.000000000 -0400 +++ nano-1.3.8-mine/doc/man/nano.1 2005-07-22 15:39:10.022705720 -0400 @@ -101,6 +101,10 @@ .B \-V (\-\-version) Show the current version number and author. .TP +.B \-W (\-\-wrap) +Override "nowrap" from \fI.nanorc\fP or the +\-\-disable\-wrapping\-as\-root configure option from the command line. +.TP .B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP) Specify a specific syntax highlighting from the \fInanorc\fP to use, if available. diff -Nru nano-1.3.8/doc/texinfo/nano.texi nano-1.3.8-mine/doc/texinfo/nano.texi --- nano-1.3.8/doc/texinfo/nano.texi 2005-06-27 01:06:02.000000000 -0400 +++ nano-1.3.8-mine/doc/texinfo/nano.texi 2005-07-22 15:52:17.264026848 -0400 @@ -172,6 +172,10 @@ @item -V, --version Print the version number and copyright and quit. address@hidden -W, --wrap +Override "nowrap" from .nanorc or the (@code{--disable-wrapping-as-root}) +configure option from the command line. + @item -Y, --syntax=[str] Specify a specific syntax highlighting from the .nanorc to use, if available. diff -Nru nano-1.3.8/src/nano.c nano-1.3.8-mine/src/nano.c --- nano-1.3.8/src/nano.c 2005-06-29 13:10:58.000000000 -0400 +++ nano-1.3.8-mine/src/nano.c 2005-07-22 16:43:10.498864600 -0400 @@ -4146,6 +4146,9 @@ /* The old value of the multibuffer option, restored after we * load all files on the command line. */ #endif +#ifndef DISABLE_WRAPPING + int reenable_wrapping = 0; /* override NO_WRAP from command line */ +#endif #ifdef HAVE_GETOPT_LONG const struct option long_options[] = { {"help", 0, NULL, 'h'}, @@ -4185,6 +4188,7 @@ {"view", 0, NULL, 'v'}, #ifndef DISABLE_WRAPPING {"nowrap", 0, NULL, 'w'}, + {"wrap", 0, NULL, 'W'}, #endif {"nohelp", 0, NULL, 'x'}, {"suspend", 0, NULL, 'z'}, @@ -4237,11 +4241,11 @@ while ((optchr = #ifdef HAVE_GETOPT_LONG getopt_long(argc, argv, - "h?ABC:EFHINOQ:RST:UVY:abcdefgijklmo:pr:s:tvwxz", + "h?ABC:EFHINOQ:RST:UVWY:abcdefgijklmo:pr:s:tvwxz", long_options, NULL) #else getopt(argc, argv, - "h?ABC:EFHINOQ:RST:UVY:abcdefgijklmo:pr:s:tvwxz") + "h?ABC:EFHINOQ:RST:UVWY:abcdefgijklmo:pr:s:tvwxz") #endif ) != -1) { @@ -4319,6 +4323,12 @@ case 'V': version(); exit(0); +#ifndef DISABLE_WRAPPING + case 'W': + UNSET(NO_WRAP); + reenable_wrapping = 1; + break; +#endif #ifdef ENABLE_COLOR case 'Y': syntaxstr = mallocstrcpy(syntaxstr, optarg); @@ -4378,6 +4388,7 @@ #ifndef DISABLE_WRAPPING case 'w': SET(NO_WRAP); + reenable_wrapping = 0; break; #endif case 'x': @@ -4479,6 +4490,10 @@ else if (geteuid() == NANO_ROOT_UID) SET(NO_WRAP); #endif +#ifndef DISABLE_WRAPPING + if (reenable_wrapping) + UNSET(NO_WRAP); +#endif #endif /* ENABLE_NANORC */ #ifndef NANO_SMALL