[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nano-devel
Subject:    [Nano-devel] [PATCH 10/15] options: warn when -L, -O, -S, or -w are given, and ignore them
From:       Benno Schulenberg <bensberg () telfort ! nl>
Date:       2019-01-31 16:49:36
Message-ID: 20190131164941.14074-10-bensberg () telfort ! nl
[Download RAW message or body]

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 mailing list
Nano-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/nano-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic