1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +02:00

lisp nil always enabled

* configure.ac: Remove --disable-elisp option. Lisp nil is always
  enabled.

* libguile/boolean.h:
* libguile/gen-scmconfig.c:
* libguile/gen-scmconfig.h.in:
* libguile/init.c:
* libguile/lang.c:
* libguile/lang.h:
* libguile/pairs.h:
* libguile/private-options.h:
* libguile/read.c: Remove conditionals for disabling elisp.
This commit is contained in:
Andy Wingo 2010-04-09 14:03:02 +02:00
parent 92e19ec06d
commit c1b7c940ec
10 changed files with 8 additions and 66 deletions

View file

@ -160,10 +160,6 @@ fi
AC_DEFINE_UNQUOTED([SCM_WARN_DEPRECATED_DEFAULT], "$warn_default", AC_DEFINE_UNQUOTED([SCM_WARN_DEPRECATED_DEFAULT], "$warn_default",
[Define this to control the default warning level for deprecated features.]) [Define this to control the default warning level for deprecated features.])
AC_ARG_ENABLE(elisp,
[ --disable-elisp omit Emacs Lisp support],,
enable_elisp=yes)
dnl Added the following configure option in January 2008 following dnl Added the following configure option in January 2008 following
dnl investigation of problems with "64" system and library calls on dnl investigation of problems with "64" system and library calls on
dnl Darwin (MacOS X). The libguile code (_scm.h) assumes that if a dnl Darwin (MacOS X). The libguile code (_scm.h) assumes that if a
@ -254,11 +250,6 @@ if test "$enable_debug_malloc" = yes; then
AC_LIBOBJ([debug-malloc]) AC_LIBOBJ([debug-malloc])
fi fi
if test "$enable_elisp" = yes; then
SCM_I_GSC_ENABLE_ELISP=1
else
SCM_I_GSC_ENABLE_ELISP=0
fi
AC_CHECK_LIB(uca, __uc_get_ar_bsp) AC_CHECK_LIB(uca, __uc_get_ar_bsp)
AC_C_CONST AC_C_CONST
@ -1622,7 +1613,6 @@ AC_SUBST([sitedir])
AC_SUBST([SCM_I_GSC_GUILE_DEBUG]) AC_SUBST([SCM_I_GSC_GUILE_DEBUG])
AC_SUBST([SCM_I_GSC_ENABLE_DISCOURAGED]) AC_SUBST([SCM_I_GSC_ENABLE_DISCOURAGED])
AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED]) AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED])
AC_SUBST([SCM_I_GSC_ENABLE_ELISP])
AC_SUBST([SCM_I_GSC_STACK_GROWS_UP]) AC_SUBST([SCM_I_GSC_STACK_GROWS_UP])
AC_SUBST([SCM_I_GSC_C_INLINE]) AC_SUBST([SCM_I_GSC_C_INLINE])
AC_CONFIG_FILES([libguile/gen-scmconfig.h]) AC_CONFIG_FILES([libguile/gen-scmconfig.h])

View file

@ -52,12 +52,8 @@
* SCM_MATCHES_BITS_IN_COMMON in tags.h for more information on * SCM_MATCHES_BITS_IN_COMMON in tags.h for more information on
* how the following macro works. * how the following macro works.
*/ */
#if SCM_ENABLE_ELISP #define scm_is_false_or_nil(x) \
# define scm_is_false_or_nil(x) \
(SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_BOOL_F)) (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_BOOL_F))
#else
# define scm_is_false_or_nil(x) (scm_is_false_assume_not_nil (x))
#endif
#define scm_is_true_and_not_nil(x) (!scm_is_false_or_nil (x)) #define scm_is_true_and_not_nil(x) (!scm_is_false_or_nil (x))
/* %nil is false. */ /* %nil is false. */
@ -80,13 +76,8 @@
* SCM_BOOL_T, SCM_ELISP_NIL, or SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0. * SCM_BOOL_T, SCM_ELISP_NIL, or SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0.
* Otherwise, it returns 0. * Otherwise, it returns 0.
*/ */
#if SCM_ENABLE_ELISP #define scm_is_bool_or_nil(x) \
# define scm_is_bool_or_nil(x) \
(SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_T, SCM_ELISP_NIL)) (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_T, SCM_ELISP_NIL))
#else
# define scm_is_bool_or_nil(x) (scm_is_bool_and_not_nil (x))
#endif
#define scm_is_bool_and_not_nil(x) \ #define scm_is_bool_and_not_nil(x) \
(SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_F, SCM_BOOL_T)) (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_F, SCM_BOOL_T))
@ -117,11 +108,8 @@ SCM_API int scm_to_bool (SCM x);
* following: SCM_BOOL_F, SCM_ELISP_NIL, SCM_EOL or * following: SCM_BOOL_F, SCM_ELISP_NIL, SCM_EOL or
* SCM_XXX_ANOTHER_LISP_FALSE_DONT_USE. Otherwise, it returns 0. * SCM_XXX_ANOTHER_LISP_FALSE_DONT_USE. Otherwise, it returns 0.
*/ */
#if SCM_ENABLE_ELISP #define scm_is_lisp_false(x) \
# define scm_is_lisp_false(x) \
(SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_F, SCM_EOL)) (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_F, SCM_EOL))
# define scm_is_lisp_true(x) (!scm_is_lisp_false(x))
#endif

View file

@ -232,11 +232,6 @@ main (int argc, char *argv[])
pf ("/* (value will be 0 or 1). */\n"); pf ("/* (value will be 0 or 1). */\n");
pf ("#define SCM_ENABLE_DEPRECATED %d\n", SCM_I_GSC_ENABLE_DEPRECATED); pf ("#define SCM_ENABLE_DEPRECATED %d\n", SCM_I_GSC_ENABLE_DEPRECATED);
/*** SCM_ENABLE_ELISP (0 or 1) ***/
pf ("\n");
pf ("/* Set to 1 to add Elisp support (in addition to Scheme). */\n");
pf ("#define SCM_ENABLE_ELISP %d /* 0 or 1 */\n", SCM_I_GSC_ENABLE_ELISP);
/*** SCM_STACK_GROWS_UP (0 or 1) ***/ /*** SCM_STACK_GROWS_UP (0 or 1) ***/
pf ("\n"); pf ("\n");
pf ("/* Set to 1 if the stack grows up, 0 otherwise. */\n"); pf ("/* Set to 1 if the stack grows up, 0 otherwise. */\n");

View file

@ -9,7 +9,6 @@
#define SCM_I_GSC_GUILE_DEBUG @SCM_I_GSC_GUILE_DEBUG@ #define SCM_I_GSC_GUILE_DEBUG @SCM_I_GSC_GUILE_DEBUG@
#define SCM_I_GSC_ENABLE_DISCOURAGED @SCM_I_GSC_ENABLE_DISCOURAGED@ #define SCM_I_GSC_ENABLE_DISCOURAGED @SCM_I_GSC_ENABLE_DISCOURAGED@
#define SCM_I_GSC_ENABLE_DEPRECATED @SCM_I_GSC_ENABLE_DEPRECATED@ #define SCM_I_GSC_ENABLE_DEPRECATED @SCM_I_GSC_ENABLE_DEPRECATED@
#define SCM_I_GSC_ENABLE_ELISP @SCM_I_GSC_ENABLE_ELISP@
#define SCM_I_GSC_STACK_GROWS_UP @SCM_I_GSC_STACK_GROWS_UP@ #define SCM_I_GSC_STACK_GROWS_UP @SCM_I_GSC_STACK_GROWS_UP@
#define SCM_I_GSC_C_INLINE @SCM_I_GSC_C_INLINE@ #define SCM_I_GSC_C_INLINE @SCM_I_GSC_C_INLINE@
#define SCM_I_GSC_NEEDS_STDINT_H @SCM_I_GSC_NEEDS_STDINT_H@ #define SCM_I_GSC_NEEDS_STDINT_H @SCM_I_GSC_NEEDS_STDINT_H@

View file

@ -557,9 +557,7 @@ scm_i_init_guile (SCM_STACKITEM *base)
scm_init_simpos (); scm_init_simpos ();
scm_init_dynamic_linking (); /* Requires smob_prehistory */ scm_init_dynamic_linking (); /* Requires smob_prehistory */
scm_bootstrap_i18n (); scm_bootstrap_i18n ();
#if SCM_ENABLE_ELISP
scm_init_lang (); scm_init_lang ();
#endif /* SCM_ENABLE_ELISP */
scm_init_script (); scm_init_script ();
scm_init_goops (); scm_init_goops ();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000, 2001, 2006, 2008 Free Software Foundation, Inc. /* Copyright (C) 1999, 2000, 2001, 2006, 2008, 2010 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -36,8 +36,6 @@
/* {Multi-language support} /* {Multi-language support}
*/ */
#if SCM_ENABLE_ELISP
void void
scm_init_lang () scm_init_lang ()
{ {
@ -46,8 +44,6 @@ scm_init_lang ()
scm_c_define ("%nil", SCM_ELISP_NIL); scm_c_define ("%nil", SCM_ELISP_NIL);
} }
#endif /* SCM_ENABLE_ELISP */
/* /*
Local Variables: Local Variables:
c-file-style: "gnu" c-file-style: "gnu"

View file

@ -3,7 +3,7 @@
#ifndef SCM_LANG_H #ifndef SCM_LANG_H
#define SCM_LANG_H #define SCM_LANG_H
/* Copyright (C) 1998, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. /* Copyright (C) 1998, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -27,20 +27,13 @@
#if SCM_ENABLE_ELISP
#define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL)) #define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
SCM_INTERNAL void scm_init_lang (void); SCM_INTERNAL void scm_init_lang (void);
#else /* ! SCM_ENABLE_ELISP */
#define SCM_NILP(x) 0
#endif /* ! SCM_ENABLE_ELISP */
#define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x)) #define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
#endif /* SCM_LANG_H */ #endif /* SCM_LANG_H */
/* /*

View file

@ -3,7 +3,7 @@
#ifndef SCM_PAIRS_H #ifndef SCM_PAIRS_H
#define SCM_PAIRS_H #define SCM_PAIRS_H
/* Copyright (C) 1995,1996,2000,2001, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. /* Copyright (C) 1995,1996,2000,2001, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -51,12 +51,8 @@
* SCM_MATCHES_BITS_IN_COMMON in tags.h for more information on * SCM_MATCHES_BITS_IN_COMMON in tags.h for more information on
* how the following macro works. * how the following macro works.
*/ */
#if SCM_ENABLE_ELISP #define scm_is_null_or_nil(x) \
# define scm_is_null_or_nil(x) \
(SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_EOL)) (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_EOL))
#else
# define scm_is_null_or_nil(x) (scm_is_null_assume_not_nil (x))
#endif
/* %nil is null. */ /* %nil is null. */
#define scm_is_null(x) (scm_is_null_or_nil(x)) #define scm_is_null(x) (scm_is_null_or_nil(x))

View file

@ -91,20 +91,11 @@ SCM_API scm_t_option scm_read_opts[];
#define SCM_RECORD_POSITIONS_P scm_read_opts[1].val #define SCM_RECORD_POSITIONS_P scm_read_opts[1].val
#define SCM_CASE_INSENSITIVE_P scm_read_opts[2].val #define SCM_CASE_INSENSITIVE_P scm_read_opts[2].val
#define SCM_KEYWORD_STYLE scm_read_opts[3].val #define SCM_KEYWORD_STYLE scm_read_opts[3].val
#if SCM_ENABLE_ELISP
#define SCM_ELISP_VECTORS_P scm_read_opts[4].val #define SCM_ELISP_VECTORS_P scm_read_opts[4].val
#define SCM_ESCAPED_PARENS_P scm_read_opts[5].val #define SCM_ESCAPED_PARENS_P scm_read_opts[5].val
#define SCM_R6RS_ESCAPES_P scm_read_opts[6].val #define SCM_R6RS_ESCAPES_P scm_read_opts[6].val
#define SCM_SQUARE_BRACKETS_P scm_read_opts[7].val #define SCM_SQUARE_BRACKETS_P scm_read_opts[7].val
#else
#define SCM_R6RS_ESCAPES_P scm_read_opts[4].val
#define SCM_SQUARE_BRACKETS_P scm_read_opts[5].val
#endif
#if SCM_ENABLE_ELISP
#define SCM_N_READ_OPTIONS 8 #define SCM_N_READ_OPTIONS 8
#else
#define SCM_N_READ_OPTIONS 6
#endif
#endif /* PRIVATE_OPTIONS */ #endif /* PRIVATE_OPTIONS */

View file

@ -70,12 +70,10 @@ scm_t_option scm_read_opts[] = {
"Convert symbols to lower case."}, "Convert symbols to lower case."},
{ SCM_OPTION_SCM, "keywords", (unsigned long) SCM_BOOL_F, { SCM_OPTION_SCM, "keywords", (unsigned long) SCM_BOOL_F,
"Style of keyword recognition: #f, 'prefix or 'postfix."}, "Style of keyword recognition: #f, 'prefix or 'postfix."},
#if SCM_ENABLE_ELISP
{ SCM_OPTION_BOOLEAN, "elisp-vectors", 0, { SCM_OPTION_BOOLEAN, "elisp-vectors", 0,
"Support Elisp vector syntax, namely `[...]'."}, "Support Elisp vector syntax, namely `[...]'."},
{ SCM_OPTION_BOOLEAN, "elisp-strings", 0, { SCM_OPTION_BOOLEAN, "elisp-strings", 0,
"Support `\\(' and `\\)' in strings."}, "Support `\\(' and `\\)' in strings."},
#endif
{ SCM_OPTION_BOOLEAN, "r6rs-hex-escapes", 0, { SCM_OPTION_BOOLEAN, "r6rs-hex-escapes", 0,
"Use R6RS variable-length character and string hex escapes."}, "Use R6RS variable-length character and string hex escapes."},
{ SCM_OPTION_BOOLEAN, "square-brackets", 1, { SCM_OPTION_BOOLEAN, "square-brackets", 1,
@ -509,13 +507,11 @@ scm_read_string (int chr, SCM port)
case '"': case '"':
case '\\': case '\\':
break; break;
#if SCM_ENABLE_ELISP
case '(': case '(':
case ')': case ')':
if (SCM_ESCAPED_PARENS_P) if (SCM_ESCAPED_PARENS_P)
break; break;
goto bad_escaped; goto bad_escaped;
#endif
case '\n': case '\n':
continue; continue;
case '0': case '0':