diff --git a/ChangeLog b/ChangeLog index cb090662d1b26ca923525e7e4306e92e685c70ba..6a8e1709b1019dd8c6b3aa01fbfab12dc2e7f7f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ * src/files.c: Update some comments to match the current status. * src/nano (finish, main): Allow -H/--historylog and -P/--poslog to function also when -I/--ignorercfiles is given. + * configure.ac: Add a --disable-histories flag, to disable the code + for the histories of search/replace strings and cursor positions. + * doc/texinfo/nano.texi: Document the new configure flag. 2014-06-18 Benno Schulenberg <bensberg@justemail.net> * src/text.c: Rename 'to_end' to 'to_eof', to lessen confusion diff --git a/configure.ac b/configure.ac index 9baa198713ff6e3fef33c31c861060fececc077b..72681a1dd2fd610a9e5855744e0f4426af5f3f93 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,12 @@ if test "x$enable_help" = xno; then AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.]) fi +AC_ARG_ENABLE(histories, +AS_HELP_STRING([--disable-histories], [Disable search and position histories])) +if test "x$enable_histories" = xno; then + AC_DEFINE(DISABLE_HISTORIES, 1, [Define this to disable search and position histories.]) +fi + AC_ARG_ENABLE(justify, AS_HELP_STRING([--disable-justify], [Disable justify/unjustify functions])) if test "x$enable_justify" = xno; then @@ -186,6 +192,9 @@ if test "x$enable_tiny" = xyes; then if test "x$enable_help" != xyes; then AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.]) fi + if test "x$enable_histories" != xyes; then + AC_DEFINE(DISABLE_HISTORIES, 1, [Define this to disable search and position histories.]) + fi if test "x$enable_justify" != xyes; then AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.]) fi diff --git a/doc/texinfo/nano.texi b/doc/texinfo/nano.texi index 8fe001f8129099c19e0c00f763f470dfba415428..91c1f8499da83b7295d74c90d4ede5fff095d7a8 100644 --- a/doc/texinfo/nano.texi +++ b/doc/texinfo/nano.texi @@ -1278,6 +1278,11 @@ Disable the help function. Doing this makes the binary much smaller, but makes it difficult for new users to learn more than very basic things about using the editor. +@item --disable-histories +Disable the code for the handling of the history files: the search and +replace strings that were used, and the cursor position at which each +file was closed. + @item --disable-justify Disable the justify and unjustify functions.