[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] --disable-nanorc does not disable support and use of na
Re: [Nano-devel] --disable-nanorc does not disable support and use of nanorc
Wed, 26 Mar 2014 20:58:11 -0400
KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; )
On Wed 26 Mar 2014 20:42:41 Benno Schulenberg wrote:
> In the past, apparently, some things were not enabled by default,
> for example the use of nanorc files and of colours. The latter needs
> the first, so --enable-color would automatically activate --enable-nanorc.
the configure help strings make it read like these features were enabled by
default already and you had to explicitly opt out. i think enabling all these
cool features by default makes sense rather than forcing people to opt in to
> But now... things are reversed, nanorc files and colours default to on,
> but the logic has not been adapted, so configuring with just
> --disable-nanorc will be overridden by the implicit --enable-color. To my
> mind it should be the other way around: a --disable-nanorc should
> automatically activate --disable-color, because colours cannot function
> without nanorc files.
> How to fix that?
i think we need to barf when we get conflicting options. so in this case, you
want something like:
@@ -146,10 +146,17 @@ fi
AS_HELP_STRING([--disable-color], [Disable color and syntax highlighting]))
+if test "x$enable_nanorc" = xno; then
+ if test "x$enable_color" = xyes; then
+ AC_MSG_ERROR([--enable-color cannot work with --disable-nanorc])
if test "x$enable_color" != xno; then
if test x$ac_cv_header_regex_h = xyes; then
- AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.])
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting,
requires regex.h and ENABLE_NANORC too!])
elif test "x$enable_color" = xyes; then
this will fall through below to the nanorc logic below, so you clean up
duplicated code too :)
> Also, --disable-utf8 and --enable-utf8 do not seem to have any effect,
> configuration always chooses the 'auto' value.
this one i broke. patch below.
@@ -176,9 +176,8 @@ if test "x$enable_nanorc" != xno; then
AC_MSG_CHECKING([whether to enable UTF-8 support])
AC_ARG_ENABLE(utf8, AS_HELP_STRING([--enable-utf8], [Enable UTF-8 support]))
AC_MSG_CHECKING([whether to use slang])
Description: This is a digitally signed message part.