[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH 10/15] options: warn when -L, -O, -S, or -w are give
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH 10/15] options: warn when -L, -O, -S, or -w are given, and ignore them |
Date: |
Thu, 31 Jan 2019 17:49:36 +0100 |
If these command-line options would override an rcfile setting of their
counterpart new option, the user will come to expect being able to do
this also in the future. But these old options need to be obsoleted
at some moment, so... better start ignoring them right now.
---
src/nano.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/nano.c b/src/nano.c
index 1c7775ea..01d7e869 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -2129,7 +2129,8 @@ int main(int argc, char **argv)
SET(RAW_SEQUENCES);
break;
case 'L':
- UNSET(FINAL_NEWLINE);
+ fprintf(stderr, N_("Option %s is ignored; it is
the default\n"),
+
"nonewlines");
break;
#ifdef ENABLED_WRAPORJUSTIFY
case 'M':
@@ -2142,7 +2143,8 @@ int main(int argc, char **argv)
break;
#endif
case 'O':
- UNSET(EMPTY_LINE);
+ fprintf(stderr, N_("Option %s is ignored; it is
the default\n"),
+
"morespace");
break;
#ifdef ENABLE_HISTORIES
case 'P':
@@ -2159,7 +2161,8 @@ int main(int argc, char **argv)
break;
#ifndef NANO_TINY
case 'S':
- UNSET(JUMPY_SCROLLING);
+ fprintf(stderr, N_("Option %s is ignored; it is
the default\n"),
+
"smooth");
break;
#endif
case 'T':
@@ -2283,7 +2286,8 @@ int main(int argc, char **argv)
break;
#ifdef ENABLE_WRAPPING
case 'w':
- UNSET(BREAK_LONG_LINES);
+ fprintf(stderr, N_("Option %s is ignored; it is
the default\n"),
+
"nowrap");
break;
#endif
case 'x':
--
2.19.2
- [Nano-devel] [PATCH 01/15] options: add -b, --breaklonglines, the counterpart of --nowrap, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 02/15] options: add -f, --finalnewline, the counterpart of --nonewlines, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 03/15] options: add -j, --jumpyscrolling, the counterpart of --smooth, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 04/15] options: add -e, --emptyline, the counterpart of --morespace, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 05/15] rcfile: add the options that correspond to -b, -f, -j, and -e, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 06/15] options: when a nanorc unsets an old flag, set the corresponding new flag, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 07/15] options: let --fill no longer imply automatic hard-wrapping, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 08/15] docs: stop saying that --fill switches on automatic hard-wrapping, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 09/15] docs: describe the four new options (-b, -f, -j, -e) [*incomplete*], Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 10/15] options: warn when -L, -O, -S, or -w are given, and ignore them,
Benno Schulenberg <=
- [Nano-devel] [PATCH 11/15] tweaks: switch from referencing NO_WRAP to referencing BREAK_LONG_LINES, Benno Schulenberg, 2019/01/31
- [Nano-devel] [PATCH 12/15] tweaks: switch from referencing NO_NEWLINES to referencing FINAL_NEWLINE, Benno Schulenberg, 2019/01/31