From 467cc8edf3fc15bb88b888aaa1f290317ffe4bce Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 4 Feb 2018 13:51:13 +0100
Subject: [PATCH] tweaks: remove two deprecated options and six rebindable
 function names

This addresses https://savannah.gnu.org/bugs/?48992.
---
 doc/nano.1    |  1 -
 doc/nano.texi |  9 ---------
 doc/nanorc.5  |  8 --------
 src/global.c  | 18 ++++++------------
 src/nano.c    |  1 -
 src/rcfile.c  |  2 --
 6 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/doc/nano.1 b/doc/nano.1
index b9de3f8e..cefb5861 100644
--- a/doc/nano.1
+++ b/doc/nano.1
@@ -121,7 +121,6 @@ Use the blank line below the title bar as extra editing space.
 .BR \-P ", " \-\-positionlog
 For the 200 most recent files, log the last position of the cursor,
 and place it at that position again upon reopening such a file.
-(The old form of this option, \fB\-\-poslog\fR, is deprecated.)
 .TP
 .BR "\-Q ""\fIcharacters\fB""" ", " "\-\-quotestr=""" \fIcharacters """
 Set the quoting string for justifying.  The default is
diff --git a/doc/nano.texi b/doc/nano.texi
index 7becdab9..b7c0e110 100644
--- a/doc/nano.texi
+++ b/doc/nano.texi
@@ -217,7 +217,6 @@ Use the blank line below the title bar as extra editing space.
 @itemx --positionlog
 For the 200 most recent files, log the last position of the cursor,
 and place it at that position again upon reopening such a file.
-(The old form of this option, @option{--poslog}, is deprecated.)
 
 @item -Q "@var{characters}"
 @itemx --quotestr="@var{characters}"
@@ -731,7 +730,6 @@ Do case-sensitive searches by default.
 
 @item set constantshow
 Constantly display the cursor position on the status bar.
-(The old form of this option, @code{set const}, is deprecated.)
 Note that this overrides @option{quickblank}.
 
 @item set cutfromcursor
@@ -815,7 +813,6 @@ directory feature is turned off.
 @item set positionlog
 Save the cursor position of files between editing sessions.
 The cursor position is remembered for the 200 most-recently edited files.
-(The old form of this option, @code{set poslog}, is deprecated.)
 
 @item set preserve
 Preserve the XON and XOFF keys (@kbd{^Q} and @kbd{^S}).
@@ -1102,7 +1099,6 @@ Starts a backward search for text in the current buffer.
 
 @item searchagain
 Repeats the last search command without prompting.
-(The form @code{research} is deprecated.)
 
 @item findprevious
 As @code{searchagain}, but always in the backward direction.
@@ -1137,7 +1133,6 @@ Cuts all text from the cursor position till the end of the buffer.
 
 @item curpos
 Shows the current cursor position: the line, column, and character positions.
-(The form @code{cursorpos} is deprecated.)
 
 @item wordcount
 Counts the number of words, lines and characters in the current buffer.
@@ -1275,7 +1270,6 @@ Toggles case sensitivity in searching (search/replace menus only).
 
 @item regexp
 Toggles whether searching/replacing is based on literal strings or regular expressions.
-(The form @code{regex} is deprecated.)
 
 @item backwards
 Toggles whether searching/replacing goes forward or backward.
@@ -1288,7 +1282,6 @@ Shows the next history entry in the prompt menus (e.g.@: search).
 
 @item flipreplace
 Toggles between searching for something and replacing something.
-(The form @code{dontreplace} is deprecated.)
 
 @item flipgoto
 Toggles between searching for text and targeting a line number.
@@ -1300,7 +1293,6 @@ Toggles between inserting a file and executing a command.
 @item flipnewbuffer
 Toggles between inserting into the current buffer and into a new
 empty buffer.
-(The form @code{newbuffer} is deprecated.)
 
 @item dosformat
 When writing a file, switches to writing a DOS format (CR/LF).
@@ -1406,7 +1398,6 @@ The 'search to replace' menu.
 
 @item replacewith
 The 'replace with' menu, which comes up after 'search to replace'.
-(The form @code{replace2} is deprecated.)
 
 @item gotoline
 The 'goto line (and column)' menu.
diff --git a/doc/nanorc.5 b/doc/nanorc.5
index b33468eb..c98bee86 100644
--- a/doc/nanorc.5
+++ b/doc/nanorc.5
@@ -96,7 +96,6 @@ Do case-sensitive searches by default.
 .TP
 .B set constantshow
 Constantly display the cursor position in the status bar.
-(The old form of this option, '\fBset const\fR', is deprecated.)
 This overrides the option \fBquickblank\fR.
 .TP
 .B set cutfromcursor
@@ -178,7 +177,6 @@ directory feature is turned off.
 .B set positionlog
 Save the cursor position of files between editing sessions.
 The cursor position is remembered for the 200 most-recently edited files.
-(The old form of this option, '\fBset poslog\fR', is deprecated.)
 .TP
 .B set preserve
 Preserve the XON and XOFF keys (^Q and ^S).
@@ -453,7 +451,6 @@ Starts a backward search for text in the current buffer.
 .TP
 .B searchagain
 Repeats the last search command without prompting.
-(The form 'research' is deprecated.)
 .TP
 .B findprevious
 As \fBsearchagain\fR, but always in the backward direction.
@@ -488,7 +485,6 @@ Cuts all text from the cursor position till the end of the buffer.
 .TP
 .B curpos
 Shows the current cursor position: the line, column, and character positions.
-(The form 'cursorpos' is deprecated.)
 .TP
 .B wordcount
 Counts the number of words, lines and characters in the current buffer.
@@ -629,7 +625,6 @@ Toggles case sensitivity in searching (search/replace menus only).
 .TP
 .B regexp
 Toggles whether searching/replacing is based on literal strings or regular expressions.
-(The form 'regex' is deprecated.)
 .TP
 .B backwards
 Toggles whether searching/replacing goes forward or backward.
@@ -642,7 +637,6 @@ Shows the next history entry in the prompt menus (e.g. search).
 .TP
 .B flipreplace
 Toggles between searching for something and replacing something.
-(The form 'dontreplace' is deprecated.)
 .TP
 .B flipgoto
 Toggles between searching for text and targeting a line number.
@@ -654,7 +648,6 @@ Toggles between inserting a file and executing a command.
 .B flipnewbuffer
 Toggles between inserting into the current buffer and into a new
 empty buffer.
-(The form 'newbuffer' is deprecated.)
 .TP
 .B dosformat
 When writing a file, switches to writing a DOS format (CR/LF).
@@ -758,7 +751,6 @@ The 'search to replace' menu.
 .TP
 .B replacewith
 The 'replace with' menu, which comes up after 'search to replace'.
-(The form 'replace2' is deprecated.)
 .TP
 .B gotoline
 The 'goto line (and column)' menu.
diff --git a/src/global.c b/src/global.c
index d6af4e7d..6d379d38 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1485,8 +1485,7 @@ sc *strtosc(const char *input)
 		s->scfunc = do_search_forward;
 	else if (!strcasecmp(input, "wherewas"))
 		s->scfunc = do_search_backward;
-	else if (!strcasecmp(input, "searchagain") ||
-			 !strcasecmp(input, "research"))  /* Deprecated.  Remove in 2018. */
+	else if (!strcasecmp(input, "searchagain"))
 		s->scfunc = do_research;
 #ifndef NANO_TINY
 	else if (!strcasecmp(input, "findprevious"))
@@ -1517,8 +1516,7 @@ sc *strtosc(const char *input)
 	else if (!strcasecmp(input, "linter"))
 		s->scfunc = do_linter;
 #endif
-	else if (!strcasecmp(input, "curpos") ||
-			 !strcasecmp(input, "cursorpos"))  /* Deprecated.  Remove in 2018. */
+	else if (!strcasecmp(input, "curpos"))
 		s->scfunc = do_cursorpos_void;
 	else if (!strcasecmp(input, "gotoline"))
 		s->scfunc = do_gotolinecolumn_void;
@@ -1622,13 +1620,11 @@ sc *strtosc(const char *input)
 		s->scfunc = do_suspend_void;
 	else if (!strcasecmp(input, "casesens"))
 		s->scfunc = case_sens_void;
-	else if (!strcasecmp(input, "regexp") ||
-			 !strcasecmp(input, "regex"))  /* Deprecated.  Remove in 2018. */
+	else if (!strcasecmp(input, "regexp"))
 		s->scfunc = regexp_void;
 	else if (!strcasecmp(input, "backwards"))
 		s->scfunc = backwards_void;
-	else if (!strcasecmp(input, "flipreplace") ||
-			 !strcasecmp(input, "dontreplace"))  /* Deprecated.  Remove in 2018. */
+	else if (!strcasecmp(input, "flipreplace"))
 		s->scfunc = flip_replace;
 	else if (!strcasecmp(input, "flipgoto") ||
 			 !strcasecmp(input, "gototext"))  /* Deprecated.  Remove end of 2018. */
@@ -1654,8 +1650,7 @@ sc *strtosc(const char *input)
 		s->scfunc = flip_execute;
 #endif
 #ifdef ENABLE_MULTIBUFFER
-	else if (!strcasecmp(input, "flipnewbuffer") ||
-			 !strcasecmp(input, "newbuffer"))  /* Deprecated.  Remove in 2018. */
+	else if (!strcasecmp(input, "flipnewbuffer"))
 		s->scfunc = flip_newbuffer;
 #endif
 #ifdef ENABLE_BROWSER
@@ -1735,8 +1730,7 @@ int strtomenu(const char *input)
 		return MWHEREIS;
 	else if (!strcasecmp(input, "replace"))
 		return MREPLACE;
-	else if (!strcasecmp(input, "replace2") ||  /* Deprecated.  Remove in 2018. */
-			 !strcasecmp(input, "replacewith"))
+	else if (!strcasecmp(input, "replacewith2"))
 		return MREPLACEWITH;
 	else if (!strcasecmp(input, "gotoline"))
 		return MGOTOLINE;
diff --git a/src/nano.c b/src/nano.c
index c57b457d..cae57e0f 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1974,7 +1974,6 @@ int main(int argc, char **argv)
 		{"locking", 0, NULL, 'G'},
 		{"historylog", 0, NULL, 'H'},
 		{"noconvert", 0, NULL, 'N'},
-		{"poslog", 0, NULL, 'P'},  /* deprecated form, remove in 2018 */
 		{"positionlog", 0, NULL, 'P'},
 		{"smooth", 0, NULL, 'S'},
 		{"wordbounds", 0, NULL, 'W'},
diff --git a/src/rcfile.c b/src/rcfile.c
index 84dc57aa..b14192d5 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -42,7 +42,6 @@ static const rcoption rcopts[] = {
 #ifdef ENABLE_JUSTIFY
 	{"brackets", 0},
 #endif
-	{"const", CONSTANT_SHOW},  /* deprecated form, remove in 2018 */
 	{"constantshow", CONSTANT_SHOW},
 #ifdef ENABLED_WRAPORJUSTIFY
 	{"fill", 0},
@@ -67,7 +66,6 @@ static const rcoption rcopts[] = {
 	{"operatingdir", 0},
 #endif
 #ifdef ENABLE_HISTORIES
-	{"poslog", POS_HISTORY},  /* deprecated form, remove in 2018 */
 	{"positionlog", POS_HISTORY},
 #endif
 	{"preserve", PRESERVE},
-- 
GitLab