commit 3690d60b714f6712c10fb7344907a72f0f14936e
parent 4dedb1c1b111166481e7ae27565ff35edd481755
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 15 Mar 2020 11:17:46 +0100
rcfile: rename bindable function 'suspendenable' to 'suspendable'
The name of a toggle function should match the name of the corresponding
option, like for 'mouse' and 'linenumbers' and 'smarthome' and such.
Diffstat:
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -1406,7 +1406,7 @@ Refreshes the screen.
@item suspend
Suspends the editor (if the suspending function is enabled, see the
-"suspendenable" entry below).
+@code{suspendable} toggle item below).
@item casesens
Toggles whether searching/replacing ignores or respects the case of
@@ -1517,9 +1517,10 @@ Toggles whether typed tabs will be converted to spaces.
@item mouse
Toggles mouse support.
-@item suspendenable
+@item suspendable
Toggles whether the suspend keystroke (@kbd{^Z} by default)
will actually suspend the editor.
+(The old name of this function, 'suspendenable', is deprecated.)
@end table
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -727,7 +727,7 @@ Refreshes the screen.
.TP
.B suspend
Suspends the editor (if the suspending function is enabled, see the
-"suspendenable" entry below).
+\fBsuspendable\fR toggle item below).
.TP
.B casesens
Toggles whether searching/replacing ignores or respects the case of
@@ -838,9 +838,10 @@ Toggles whether typed tabs will be converted to spaces.
.B mouse
Toggles mouse support.
.TP
-.B suspendenable
+.B suspendable
Toggles whether the suspend keystroke (\fB^Z\fR by default)
will actually suspend the editor.
+(The old name of this function, 'suspendenable', is deprecated.)
.RE
.TP
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -466,7 +466,8 @@ keystruct *strtosc(const char *input)
else if (!strcmp(input, "mouse"))
s->toggle = USE_MOUSE;
#endif
- else if (!strcmp(input, "suspendenable"))
+ else if (!strcmp(input, "suspendable") ||
+ !strcmp(input, "suspendenable")) /* Deprecated; remove in 2022. */
s->toggle = SUSPENDABLE;
else
#endif /* !NANO_TINY */