nano-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]