diff --git a/configure.ac b/configure.ac index 16cd4d34..dc06f559 100644 --- a/configure.ac +++ b/configure.ac @@ -298,12 +298,6 @@ if test "x$enable_wrapping" != xno; then AC_DEFINE(ENABLE_WRAPPING, 1, [Define this to have hard text wrapping.]) fi -AC_ARG_ENABLE(wrapping-as-root, -AS_HELP_STRING([--disable-wrapping-as-root], [Disable wrapping of text as root by default])) -if test "x$enable_wrapping_as_root" = xno; then - AC_DEFINE(DISABLE_ROOTWRAPPING, 1, [Define this to disable text wrapping as root by default.]) -fi - AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debugging (disabled by default)])) if test "x$enable_debug" = xyes; then diff --git a/doc/nano.texi b/doc/nano.texi index 6b485f90..4141eec7 100644 --- a/doc/nano.texi +++ b/doc/nano.texi @@ -1683,10 +1683,6 @@ chances are you only want this feature when you're working on the nano source. Disables Native Language support. This will disable the use of any available GNU @command{nano} translations. -@item --disable-wrapping-as-root -Disable hard-wrapping of overlong lines by default when @command{nano} -is run as root. - @item --enable-utf8 Enable support for reading and writing Unicode files. This will require either a wide version of curses, or a UTF-8-enabled version of Slang. diff --git a/src/nano.c b/src/nano.c index 60f98b83..ddc2dfdd 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1016,9 +1016,6 @@ void version(void) #endif #endif /* !NANO_TINY */ -#ifdef DISABLE_ROOTWRAPPING - printf(" --disable-wrapping-as-root"); -#endif #ifdef DEBUG printf(" --enable-debug"); #endif @@ -2071,13 +2068,6 @@ int main(int argc, char **argv) " -- please report a bug\n", (int)MB_CUR_MAX); #endif -#if !defined(ENABLE_NANORC) && defined(DISABLE_ROOTWRAPPING) - /* If we don't have rcfile support, --disable-wrapping-as-root is - * used, and we're root, turn wrapping off. */ - if (geteuid() == NANO_ROOT_UID) - SET(NO_WRAP); -#endif - /* Set sensible defaults, different from what Pico does. */ SET(NO_WRAP); SET(NO_NEWLINES); @@ -2398,17 +2388,10 @@ int main(int argc, char **argv) for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) flags[i] |= flags_cmdline[i]; } -#ifdef DISABLE_ROOTWRAPPING - /* If we don't have any rcfiles, --disable-wrapping-as-root is used, - * and we're root, turn wrapping off. */ - else if (geteuid() == NANO_ROOT_UID) - SET(NO_WRAP); -#endif #endif /* ENABLE_NANORC */ #ifdef ENABLE_WRAPPING - /* Override a "set nowrap" in an rcfile (or a --disable-wrapping-as-root) - * if --fill was given on the command line and not undone by --nowrap. */ + /* A --fill on the command line overrides a "set nowrap" in an rcfile. */ if (forced_wrapping) UNSET(NO_WRAP); #endif diff --git a/src/rcfile.c b/src/rcfile.c index 8718a30e..b68ba7d4 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1225,13 +1225,6 @@ void do_rcfiles(void) nanorc = mallocstrcpy(nanorc, SYSCONFDIR "/nanorc"); parse_one_nanorc(); - /* When configured with --disable-wrapping-as-root, turn wrapping off - * for root, so that only root's .nanorc or --fill can turn it on. */ -#ifdef DISABLE_ROOTWRAPPING - if (geteuid() == NANO_ROOT_UID) - SET(NO_WRAP); -#endif - get_homedir(); xdgconfdir = getenv("XDG_CONFIG_HOME");