diff --git a/ChangeLog b/ChangeLog index cb090662..6a8e1709 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 * src/text.c: Rename 'to_end' to 'to_eof', to lessen confusion diff --git a/configure.ac b/configure.ac index 9baa1987..72681a1d 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 8fe001f8..91c1f849 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.