guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-9-70-g286


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-9-70-g2860ff4
Date: Fri, 09 Apr 2010 19:14:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=2860ff4675cf1a47c28e1defe094894622d046b9

The branch, master has been updated
       via  2860ff4675cf1a47c28e1defe094894622d046b9 (commit)
       via  92a61010bd04dfa81ac94b32e40d0e7a6c932845 (commit)
       via  474060a23ccd7db9784a99912ec505f796ac12e5 (commit)
       via  cd038da5467d6e4cc2f04a4ebd0f915b62359781 (commit)
      from  54e53aa4301bcb8aaff0a5dfd4af044ee693f235 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2860ff4675cf1a47c28e1defe094894622d046b9
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 14:43:49 2010 +0200

    re-enable elisp test
    
    * test-suite/tests/elisp.test: Rework for #nil, to actually be enabled,
      to always run, and to use the new compiler. Comment out some failing 
tests, to
      be dealt with in the future.

commit 92a61010bd04dfa81ac94b32e40d0e7a6c932845
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 14:44:28 2010 +0200

    change remaining %nil -> #nil
    
    * doc/ref/vm.texi:
    * libguile/boolean.h:
    * libguile/pairs.h:
    * module/language/elisp/README:
    * test-suite/tests/elisp-compiler.test:
    * test-suite/tests/load.test: Change remaining mentions of %nil to #nil.

commit 474060a23ccd7db9784a99912ec505f796ac12e5
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 21:04:52 2010 +0200

    elisp fixes for nil, and, or
    
    * module/language/elisp/runtime/macro-slot.scm (or, and): Fix one-arg
      case to return the arg as-is.
    
    * module/language/elisp/runtime.scm (nil-value): Fix to be #nil.

commit cd038da5467d6e4cc2f04a4ebd0f915b62359781
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 14:26:31 2010 +0200

    remove libguile/lang.h, deprecate %nil (in favor of #nil)
    
    * libguile/Makefile.am:
    * libguile/init.c:
    * libguile/lang.c:
    * libguile/lang.h: Remove lang.c and lang.h.
    
    * libguile/pairs.h (SCM_NIL_P, SCM_NULL_OR_NIL_P): Moved here.
    
    * module/ice-9/deprecated.scm (%nil): %nil definition moved here.
    
    * libguile/alist.c:
    * libguile/async.c:
    * libguile/backtrace.c:
    * libguile/boolean.c:
    * libguile/dynl.c:
    * libguile/eval.c:
    * libguile/filesys.c:
    * libguile/fluids.c:
    * libguile/list.c:
    * libguile/load.c:
    * libguile/options.c:
    * libguile/posix.c:
    * libguile/print.c:
    * libguile/promises.c:
    * libguile/sort.c:
    * libguile/throw.c:
    * libguile/trees.c:
    * libguile/vectors.c:
    * libguile/vm.c:
    * libguile/weaks.c:
    * srfi/srfi-1.c: <libguile/lang.h> references removed.

-----------------------------------------------------------------------

Summary of changes:
 doc/ref/vm.texi                              |    2 +-
 libguile/Makefile.am                         |    4 -
 libguile/alist.c                             |    3 +-
 libguile/async.c                             |    3 +-
 libguile/backtrace.c                         |    3 +-
 libguile/boolean.c                           |    1 -
 libguile/boolean.h                           |    7 +-
 libguile/dynl.c                              |    1 -
 libguile/eval.c                              |    1 -
 libguile/filesys.c                           |    3 +-
 libguile/fluids.c                            |    1 -
 libguile/init.c                              |    2 -
 libguile/lang.c                              |   51 ---
 libguile/lang.h                              |   43 --
 libguile/list.c                              |    3 +-
 libguile/load.c                              |    1 -
 libguile/options.c                           |    3 +-
 libguile/pairs.h                             |   13 +-
 libguile/posix.c                             |    1 -
 libguile/print.c                             |    1 -
 libguile/promises.c                          |    3 +-
 libguile/sort.c                              |    3 +-
 libguile/throw.c                             |    1 -
 libguile/trees.c                             |    3 +-
 libguile/vectors.c                           |    3 +-
 libguile/vm.c                                |    1 -
 libguile/weaks.c                             |    3 +-
 module/ice-9/deprecated.scm                  |    2 +
 module/language/elisp/README                 |    2 +-
 module/language/elisp/runtime.scm            |    7 +-
 module/language/elisp/runtime/macro-slot.scm |   45 ++-
 srfi/srfi-1.c                                |    3 +-
 test-suite/tests/elisp-compiler.test         |    4 +-
 test-suite/tests/elisp.test                  |  600 +++++++++++++-------------
 test-suite/tests/load.test                   |   18 +-
 35 files changed, 363 insertions(+), 482 deletions(-)
 delete mode 100644 libguile/lang.c
 delete mode 100644 libguile/lang.h

diff --git a/doc/ref/vm.texi b/doc/ref/vm.texi
index 0e9ba7b..0b56b4b 100644
--- a/doc/ref/vm.texi
+++ b/doc/ref/vm.texi
@@ -823,7 +823,7 @@ Push @code{#t} onto the stack.
 @end deffn
 
 @deffn Instruction make-nil
-Push @code{%nil} onto the stack.
+Push @code{#nil} onto the stack.
 @end deffn
 
 @deffn Instruction make-eol
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 59a3647..a841c9f 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -151,7 +151,6 @@ address@hidden@_la_SOURCES =                                
\
        instructions.c                          \
        ioext.c                                 \
        keywords.c                              \
-       lang.c                                  \
        list.c                                  \
        load.c                                  \
        macros.c                                \
@@ -250,7 +249,6 @@ DOT_X_FILES =                                       \
        init.x                                  \
        ioext.x                                 \
        keywords.x                              \
-       lang.x                                  \
        list.x                                  \
        load.x                                  \
        macros.x                                \
@@ -350,7 +348,6 @@ DOT_DOC_FILES =                             \
        init.doc                                \
        ioext.doc                               \
        keywords.doc                            \
-       lang.doc                                \
        list.doc                                \
        load.doc                                \
        macros.doc                              \
@@ -516,7 +513,6 @@ modinclude_HEADERS =                                \
        ioext.h                                 \
        iselect.h                               \
        keywords.h                              \
-       lang.h                                  \
        list.h                                  \
        load.h                                  \
        macros.h                                \
diff --git a/libguile/alist.c b/libguile/alist.c
index 919bd22..fd2ccde 100644
--- a/libguile/alist.c
+++ b/libguile/alist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2006, 2008 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2006, 2008, 2010 Free 
Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -25,7 +25,6 @@
 #include "libguile/_scm.h"
 #include "libguile/eq.h"
 #include "libguile/list.h"
-#include "libguile/lang.h"
 
 #include "libguile/validate.h"
 #include "libguile/pairs.h"
diff --git a/libguile/async.c b/libguile/async.c
index ddb2a21..e448dc1 100644
--- a/libguile/async.c
+++ b/libguile/async.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006, 2008, 2009 
Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006, 2008, 2009, 
2010 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -30,7 +30,6 @@
 #include "libguile/throw.h"
 #include "libguile/root.h"
 #include "libguile/smob.h"
-#include "libguile/lang.h"
 #include "libguile/dynwind.h"
 #include "libguile/deprecation.h"
 
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index f8b259f..bfd8d97 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -1,5 +1,5 @@
 /* Printing of backtraces and error messages
- * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009 Free 
Software Foundation
+ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010 
Free Software Foundation
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -45,7 +45,6 @@
 #include "libguile/frames.h"
 
 #include "libguile/validate.h"
-#include "libguile/lang.h"
 #include "libguile/backtrace.h"
 #include "libguile/filesys.h"
 #include "libguile/private-options.h"
diff --git a/libguile/boolean.c b/libguile/boolean.c
index 7d58582..452b8ad 100644
--- a/libguile/boolean.c
+++ b/libguile/boolean.c
@@ -26,7 +26,6 @@
 
 #include "libguile/validate.h"
 #include "libguile/boolean.h"
-#include "libguile/lang.h"
 #include "libguile/tags.h"
 
 #include "verify.h"
diff --git a/libguile/boolean.h b/libguile/boolean.h
index 3e9debd..7084fdf 100644
--- a/libguile/boolean.h
+++ b/libguile/boolean.h
@@ -35,13 +35,13 @@
 
 /*
  * Use these macros if it's important (for correctness)
- * that %nil MUST be considered true
+ * that #nil MUST be considered true
  */
 #define scm_is_false_and_not_nil(x)     (scm_is_eq ((x), SCM_BOOL_F))
 #define scm_is_true_or_nil(x)          (!scm_is_eq ((x), SCM_BOOL_F))
 
 /*
- * Use these macros if %nil will never be tested,
+ * Use these macros if #nil will never be tested,
  * for increased efficiency.
  */
 #define scm_is_false_assume_not_nil(x)  (scm_is_eq ((x), SCM_BOOL_F))
@@ -56,7 +56,8 @@
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_BOOL_F))
 #define scm_is_true_and_not_nil(x) (!scm_is_false_or_nil (x))
 
-/* %nil is false. */
+/* 
+#nil is false. */
 #define scm_is_false(x)  (scm_is_false_or_nil (x))
 #define scm_is_true(x)   (!scm_is_false (x))
 
diff --git a/libguile/dynl.c b/libguile/dynl.c
index 449acc0..b76e85c 100644
--- a/libguile/dynl.c
+++ b/libguile/dynl.c
@@ -55,7 +55,6 @@ maybe_drag_in_eprintf ()
 #include "libguile/ports.h"
 #include "libguile/strings.h"
 #include "libguile/deprecation.h"
-#include "libguile/lang.h"
 #include "libguile/validate.h"
 #include "libguile/dynwind.h"
 #include "libguile/foreign.h"
diff --git a/libguile/eval.c b/libguile/eval.c
index 707144b..f775d31 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -42,7 +42,6 @@
 #include "libguile/goops.h"
 #include "libguile/hash.h"
 #include "libguile/hashtab.h"
-#include "libguile/lang.h"
 #include "libguile/list.h"
 #include "libguile/macros.h"
 #include "libguile/memoize.h"
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 37b45de..5ca1233 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2009 Free 
Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2009, 2010 
Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -43,7 +43,6 @@
 #include "libguile/iselect.h"
 #include "libguile/strings.h"
 #include "libguile/vectors.h"
-#include "libguile/lang.h"
 #include "libguile/dynwind.h"
 
 #include "libguile/validate.h"
diff --git a/libguile/fluids.c b/libguile/fluids.c
index 17d67e9..9aa1eb2 100644
--- a/libguile/fluids.c
+++ b/libguile/fluids.c
@@ -31,7 +31,6 @@
 #include "libguile/eval.h"
 #include "libguile/ports.h"
 #include "libguile/deprecation.h"
-#include "libguile/lang.h"
 #include "libguile/validate.h"
 #include "libguile/bdw-gc.h"
 
diff --git a/libguile/init.c b/libguile/init.c
index f5e8e64..0d4f8c2 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -74,7 +74,6 @@
 #include "libguile/iselect.h"
 #include "libguile/ioext.h"
 #include "libguile/keywords.h"
-#include "libguile/lang.h"
 #include "libguile/list.h"
 #include "libguile/load.h"
 #include "libguile/macros.h"
@@ -557,7 +556,6 @@ scm_i_init_guile (SCM_STACKITEM *base)
   scm_init_simpos ();
   scm_init_dynamic_linking (); /* Requires smob_prehistory */
   scm_bootstrap_i18n ();
-  scm_init_lang ();
   scm_init_script ();
 
   scm_init_goops ();
diff --git a/libguile/lang.c b/libguile/lang.c
deleted file mode 100644
index 9a87bb4..0000000
--- a/libguile/lang.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*     Copyright (C) 1999, 2000, 2001, 2006, 2008, 2010 Free Software 
Foundation, Inc.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "libguile/_scm.h"
-
-#include "libguile/eval.h"
-#include "libguile/macros.h"
-#include "libguile/root.h"
-
-#include "libguile/validate.h"
-#include "libguile/lang.h"
-
-
-
-/* {Multi-language support}
- */
-
-void
-scm_init_lang ()
-{
-#include "libguile/lang.x"
-
-  scm_c_define ("%nil", SCM_ELISP_NIL);
-}
-
-/*
-  Local Variables:
-  c-file-style: "gnu"
-  End:
-*/
diff --git a/libguile/lang.h b/libguile/lang.h
deleted file mode 100644
index d0482ee..0000000
--- a/libguile/lang.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* classes: h_files */
-
-#ifndef SCM_LANG_H
-#define SCM_LANG_H
-
-/* Copyright (C) 1998, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, 
Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-
-
-#include "libguile/__scm.h"
-
-
-
-#define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
-
-SCM_INTERNAL void scm_init_lang (void);
-
-#define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
-
-
-#endif  /* SCM_LANG_H */
-
-/*
-  Local Variables:
-  c-file-style: "gnu"
-  End:
-*/
diff --git a/libguile/list.c b/libguile/list.c
index ba4b249..23ef404 100644
--- a/libguile/list.c
+++ b/libguile/list.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2008,2009
+/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2008,2009,2010
  * Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
@@ -25,7 +25,6 @@
 
 #include "libguile/_scm.h"
 #include "libguile/eq.h"
-#include "libguile/lang.h"
 
 #include "libguile/validate.h"
 #include "libguile/list.h"
diff --git a/libguile/load.c b/libguile/load.c
index eeb3543..0e4894e 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -38,7 +38,6 @@
 #include "libguile/root.h"
 #include "libguile/strings.h"
 #include "libguile/modules.h"
-#include "libguile/lang.h"
 #include "libguile/chars.h"
 #include "libguile/srfi-13.h"
 
diff --git a/libguile/options.c b/libguile/options.c
index ba2e95e..6e4c187 100644
--- a/libguile/options.c
+++ b/libguile/options.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009 Free Software 
Foundation
+/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009, 2010 Free 
Software Foundation
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -24,7 +24,6 @@
 #include "libguile/_scm.h"
 #include "libguile/mallocs.h"
 #include "libguile/strings.h"
-#include "libguile/lang.h"
 
 #include "libguile/options.h"
 
diff --git a/libguile/pairs.h b/libguile/pairs.h
index 861f9a0..0e98162 100644
--- a/libguile/pairs.h
+++ b/libguile/pairs.h
@@ -36,12 +36,13 @@
 
 /*
  * Use scm_is_null_and_not_nil if it's important (for correctness)
- * that %nil must NOT be considered null.
+ * that #nil must NOT be considered null.
  */
 #define scm_is_null_and_not_nil(x)     (scm_is_eq ((x), SCM_EOL))
 
 /*
- * Use scm_is_null_assume_not_nil if %nil will never be tested,
+ * Use scm_is_null_assume_not_nil if 
+#nil will never be tested,
  * for increased efficiency.
  */
 #define scm_is_null_assume_not_nil(x)  (scm_is_eq ((x), SCM_EOL))
@@ -54,7 +55,13 @@
 #define scm_is_null_or_nil(x)  \
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_EOL))
 
-/* %nil is null. */
+
+/* Older spellings for these nil predicates. */
+#define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
+#define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
+
+
+/* #nil is null. */
 #define scm_is_null(x)         (scm_is_null_or_nil(x))
 
 #define SCM_CAR(x)             (SCM_VALIDATE_PAIR (x, SCM_CELL_OBJECT_0 (x)))
diff --git a/libguile/posix.c b/libguile/posix.c
index 73921a2..3244e6e 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -37,7 +37,6 @@
 #include "libguile/srfi-14.h"
 #include "libguile/vectors.h"
 #include "libguile/values.h"
-#include "libguile/lang.h"
 
 #include "libguile/validate.h"
 #include "libguile/posix.h"
diff --git a/libguile/print.c b/libguile/print.c
index ca38d42..e469277 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -44,7 +44,6 @@
 #include "libguile/strings.h"
 #include "libguile/strports.h"
 #include "libguile/vectors.h"
-#include "libguile/lang.h"
 #include "libguile/numbers.h"
 #include "libguile/vm.h"
 
diff --git a/libguile/promises.c b/libguile/promises.c
index fc34cc8..45a76a9 100644
--- a/libguile/promises.c
+++ b/libguile/promises.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
+/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
  * Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
@@ -41,7 +41,6 @@
 #include "libguile/goops.h"
 #include "libguile/hash.h"
 #include "libguile/hashtab.h"
-#include "libguile/lang.h"
 #include "libguile/list.h"
 #include "libguile/macros.h"
 #include "libguile/memoize.h"
diff --git a/libguile/sort.c b/libguile/sort.c
index 763978f..5fdbb17 100644
--- a/libguile/sort.c
+++ b/libguile/sort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999,2000,2001,2002, 2004, 2006, 2007, 2008, 2009 Free 
Software Foundation, Inc.
+/* Copyright (C) 1999,2000,2001,2002, 2004, 2006, 2007, 2008, 2009, 2010 Free 
Software Foundation, Inc.
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; either version 3 of
@@ -43,7 +43,6 @@
 #include "libguile/array-map.h"
 #include "libguile/feature.h"
 #include "libguile/vectors.h"
-#include "libguile/lang.h"
 #include "libguile/async.h"
 #include "libguile/dynwind.h"
 
diff --git a/libguile/throw.c b/libguile/throw.c
index 595e3be..3e95fb3 100644
--- a/libguile/throw.c
+++ b/libguile/throw.c
@@ -36,7 +36,6 @@
 #include "libguile/stacks.h"
 #include "libguile/fluids.h"
 #include "libguile/ports.h"
-#include "libguile/lang.h"
 #include "libguile/validate.h"
 #include "libguile/vm.h"
 #include "libguile/throw.h"
diff --git a/libguile/trees.c b/libguile/trees.c
index cbfd427..76bb686 100644
--- a/libguile/trees.c
+++ b/libguile/trees.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
+/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
  * Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
@@ -25,7 +25,6 @@
 
 #include "libguile/_scm.h"
 #include "libguile/eq.h"
-#include "libguile/lang.h"
 
 #include "libguile/validate.h"
 #include "libguile/list.h"
diff --git a/libguile/vectors.c b/libguile/vectors.c
index 6ac5acb..321b499 100644
--- a/libguile/vectors.c
+++ b/libguile/vectors.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009 Free Software 
Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2009, 2010 Free 
Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -26,7 +26,6 @@
 #include "libguile/eq.h"
 #include "libguile/root.h"
 #include "libguile/strings.h"
-#include "libguile/lang.h"
 
 #include "libguile/validate.h"
 #include "libguile/vectors.h"
diff --git a/libguile/vm.c b/libguile/vm.c
index f5e66ae..54a143e 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -33,7 +33,6 @@
 #include "instructions.h"
 #include "objcodes.h"
 #include "programs.h"
-#include "lang.h" /* NULL_OR_NIL_P */
 #include "vm.h"
 
 /* I sometimes use this for debugging. */
diff --git a/libguile/weaks.c b/libguile/weaks.c
index 913166f..1d5fcf4 100644
--- a/libguile/weaks.c
+++ b/libguile/weaks.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2006, 2008, 2009 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2006, 2008, 2009, 2010 Free 
Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -26,7 +26,6 @@
 
 #include "libguile/_scm.h"
 #include "libguile/vectors.h"
-#include "libguile/lang.h"
 #include "libguile/hashtab.h"
 
 #include "libguile/validate.h"
diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm
index 82cd726..081f3f8 100644
--- a/module/ice-9/deprecated.scm
+++ b/module/ice-9/deprecated.scm
@@ -258,3 +258,5 @@
   (issue-deprecation-warning
    "`closure?' is deprecated. Use `procedure?' instead.")
   (procedure? x))
+
+(define %nil #nil)
diff --git a/module/language/elisp/README b/module/language/elisp/README
index 4f33711..b93550f 100644
--- a/module/language/elisp/README
+++ b/module/language/elisp/README
@@ -31,7 +31,7 @@ Especially still missing:
   * anonymous macros
 
 Other ideas and things to think about:
-  * %nil vs. #f/'() handling in Guile
+  * #nil vs. #f/'() handling in Guile
 
 Compiler options implemented:
   * #:disable-void-check ['all / '(sym1 sym2 sym3)] to disable the check
diff --git a/module/language/elisp/runtime.scm 
b/module/language/elisp/runtime.scm
index cb562c3..0d783b6 100644
--- a/module/language/elisp/runtime.scm
+++ b/module/language/elisp/runtime.scm
@@ -1,6 +1,6 @@
 ;;; Guile Emacs Lisp
 
-;;; Copyright (C) 2009 Free Software Foundation, Inc.
+;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 ;;;
 ;;; This library is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public
@@ -39,10 +39,9 @@
 (define void (list 42))
 
 
-; Values for t and nil.
+; Values for t and nil. (FIXME remove this abstraction)
 
-; FIXME: Use real nil.
-(define nil-value #f)
+(define nil-value #nil)
 (define t-value #t)
 
 
diff --git a/module/language/elisp/runtime/macro-slot.scm 
b/module/language/elisp/runtime/macro-slot.scm
index 11ab59b..e28fa31 100644
--- a/module/language/elisp/runtime/macro-slot.scm
+++ b/module/language/elisp/runtime/macro-slot.scm
@@ -1,6 +1,6 @@
 ;;; Guile Emacs Lisp
 
-;;; Copyright (C) 2009 Free Software Foundation, Inc.
+;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 ;;;
 ;;; This library is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public
@@ -84,27 +84,32 @@
 ; The and and or forms can also be easily defined with macros.
 
 (built-in-macro and
-  (lambda (. args)
-    (if (null? args)
-      't
-      (let iterate ((tail args))
-        (if (null? (cdr tail))
-          (car tail)
-          `(if ,(car tail)
-             ,(iterate (cdr tail))
-             nil))))))
+  (case-lambda
+    (() 't)
+    ((x) x)
+    ((x . args)
+     (let iterate ((x x) (tail args))
+       (if (null? tail)
+           x
+           `(if ,x
+                ,(iterate (car tail) (cdr tail))
+                nil))))))
 
 (built-in-macro or
-  (lambda (. args)
-    (let iterate ((tail args))
-      (if (null? tail)
-        'nil
-        (let ((var (gensym)))
-          `(without-void-checks (,var)
-             (lexical-let ((,var ,(car tail)))
-               (if ,var
-                 ,var
-                 ,(iterate (cdr tail))))))))))
+  (case-lambda
+    (() 'nil)
+    ((x) x)
+    ((x . args)
+     (let iterate ((x x) (tail args))
+       (if (null? tail)
+           x
+           (let ((var (gensym)))
+             `(without-void-checks
+               (,var)
+               (lexical-let ((,var ,x))
+                            (if ,var
+                                ,var
+                                ,(iterate (car tail) (cdr tail)))))))))))
 
 
 ; Define the dotimes and dolist iteration macros.
diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c
index a0e9803..537c2b3 100644
--- a/srfi/srfi-1.c
+++ b/srfi/srfi-1.c
@@ -1,6 +1,6 @@
 /* srfi-1.c --- SRFI-1 procedures for Guile
  *
- *     Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2005, 2006, 
2008, 2009
+ *     Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2005, 2006, 
2008, 2009, 2010
  *     Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -24,7 +24,6 @@
 #endif
 
 #include <libguile.h>
-#include <libguile/lang.h>
 
 #include "srfi-1.h"
 
diff --git a/test-suite/tests/elisp-compiler.test 
b/test-suite/tests/elisp-compiler.test
index 3d3bb1d..61f0acd 100644
--- a/test-suite/tests/elisp-compiler.test
+++ b/test-suite/tests/elisp-compiler.test
@@ -1,6 +1,6 @@
-;;;; elisp-compiler.test --- Test the compiler for Elisp.
+;;;; elisp-compiler.test --- Test the compiler for Elisp.  -*- scheme -*-
 ;;;;
-;;;; Copyright (C) 2009 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 ;;;; Daniel Kraft
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
diff --git a/test-suite/tests/elisp.test b/test-suite/tests/elisp.test
index f75b34f..e648791 100644
--- a/test-suite/tests/elisp.test
+++ b/test-suite/tests/elisp.test
@@ -1,5 +1,5 @@
 ;;;; elisp.test --- tests guile's elisp support     -*- scheme -*-
-;;;; Copyright (C) 2002, 2003, 2006, 2009 Free Software Foundation, Inc.
+;;;; Copyright (C) 2002, 2003, 2006, 2009, 2010 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -16,349 +16,337 @@
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
 
 (define-module (test-suite test-elisp)
-  :use-module (test-suite lib)
-  :use-module (ice-9 weak-vector))
+  #:use-module (test-suite lib)
+  #:use-module (system base compile)
+  #:use-module (ice-9 weak-vector))
 
-;; FIXME: the test suite is good, but it uses the old lang elisp module
-;; instead of the new code. Disable for now.
-'(
+(with-test-prefix "scheme"
 
-(define *old-stack-level* (and=> (memq 'stack (debug-options)) cadr))
-(if *old-stack-level*
-    (debug-set! stack (* 2 *old-stack-level*)))
+  (with-test-prefix "nil value is a boolean"
 
-(define *old-%load-should-autocompile* %load-should-autocompile)
-(set! %load-should-autocompile #f)
+    (pass-if "boolean?"
+      (boolean? #nil)))
+  
 
-;;;
-;;; elisp
-;;;
-
-(if (defined? '%nil)
-
-    (with-test-prefix "scheme"
-
-      (with-test-prefix "nil value is a boolean"
-
-        (pass-if "boolean?"
-          (boolean? %nil))
-
-       )
-
-      (with-test-prefix "nil value is false"
-
-        (pass-if "not"
-          (eq? (not %nil) #t))
-
-        (pass-if "if"
-         (if %nil #f #t))
-
-       (pass-if "and"
-          (eq? (and %nil #t) #f))
-
-        (pass-if "or"
-          (eq? (or %nil #f) #f))
-
-        (pass-if "cond"
-          (cond (%nil #f) (else #t)))
-
-       (pass-if "do"
-         (call-with-current-continuation
-           (lambda (exit)
-             (do ((i 0 (+ i 1)))
-                 (%nil (exit #f))
-               (if (> i 10)
-                   (exit #t))))))
-
-       )
-
-      (with-test-prefix "nil value as an empty list"
-
-       (pass-if "list?"
-          (list? %nil))
-
-       (pass-if "null?"
-          (null? %nil))
-
-       (pass-if "sort"
-          (eq? (sort %nil <) %nil))
+  (with-test-prefix "nil value is false"
 
-       )
+    (pass-if "not"
+      (eq? (not #nil) #t))
+
+    (pass-if "if"
+      (if #nil #f #t))
+
+    (pass-if "and"
+      (eq? (and #nil #t) #f))
 
-      (with-test-prefix "lists formed using nil value"
-
-       (pass-if "list?"
-          (list? (cons 'a %nil)))
-
-        (pass-if "length of %nil"
-          (= (length %nil) 0))
-
-        (pass-if "length"
-          (= (length (cons 'a (cons 'b (cons 'c %nil)))) 3))
-
-        (pass-if "length (with backquoted list)"
-          (= (length `(a b c . ,%nil)) 3))
-
-       (pass-if "write (%nil)"
-          (string=? (with-output-to-string
-                     (lambda () (write %nil)))
-                   "#nil"))            ; Hmmm... should be "()" ?
-
-       (pass-if "display (%nil)"
-          (string=? (with-output-to-string
-                     (lambda () (display %nil)))
-                   "#nil"))            ; Ditto.
-
-       (pass-if "write (list)"
-          (string=? (with-output-to-string
-                     (lambda () (write (cons 'a %nil))))
-                   "(a)"))
-
-       (pass-if "display (list)"
-          (string=? (with-output-to-string
-                     (lambda () (display (cons 'a %nil))))
-                   "(a)"))
-
-       (pass-if "assq"
-          (and (equal? (assq 1 `((1 one) (2 two) . ,%nil))
-                      '(1 one))
-              (equal? (assq 3 `((1 one) (2 two) . ,%nil))
-                      #f)))
-
-       (pass-if "assv"
-          (and (equal? (assv 1 `((1 one) (2 two) . ,%nil))
-                      '(1 one))
-              (equal? (assv 3 `((1 one) (2 two) . ,%nil))
-                      #f)))
-
-       (pass-if "assoc"
-          (and (equal? (assoc 1 `((1 one) (2 two) . ,%nil))
-                      '(1 one))
-              (equal? (assoc 3 `((1 one) (2 two) . ,%nil))
-                      #f)))
-
-       (pass-if "with-fluids*"
-          (let ((f (make-fluid))
-                (g (make-fluid)))
-            (with-fluids* (cons f (cons g %nil))
-                         '(3 4)
-                         (lambda ()
-                           (and (eq? (fluid-ref f) 3)
-                                (eq? (fluid-ref g) 4))))))
-
-       (pass-if "append!"
-         (let ((a (copy-tree '(1 2 3)))
-               (b (copy-tree `(4 5 6 . ,%nil)))
-               (c (copy-tree '(7 8 9)))
-               (d (copy-tree `(a b c . ,%nil))))
-           (equal? (append! a b c d)
-                   `(1 2 3 4 5 6 7 8 9 a b c . ,%nil))))
-
-       (pass-if "last-pair"
-         (equal? (last-pair `(1 2 3 4 5 . ,%nil))
-                 (cons 5 %nil)))
-
-       (pass-if "reverse"
-         (equal? (reverse `(1 2 3 4 5 . ,%nil))
-                 '(5 4 3 2 1)))        ; Hmmm... is this OK, or
+    (pass-if "or"
+      (eq? (or #nil #f) #f))
+
+    (pass-if "cond"
+      (cond (#nil #f) (else #t)))
+
+    (pass-if "do"
+      (call-with-current-continuation
+       (lambda (exit)
+         (do ((i 0 (+ i 1)))
+             (#nil (exit #f))
+           (if (> i 10)
+               (exit #t)))))))
+  
+
+  (with-test-prefix "nil value as an empty list"
+
+    (pass-if "list?"
+      (list? #nil))
+
+    (pass-if "null?"
+      (null? #nil))
+
+    (pass-if "sort"
+      (eq? (sort #nil <) #nil)))
+  
+
+  (with-test-prefix "lists formed using nil value"
+
+    (pass-if "list?"
+      (list? (cons 'a #nil)))
+
+    (pass-if "length of #nil"
+      (= (length #nil) 0))
+
+    (pass-if "length"
+      (= (length (cons 'a (cons 'b (cons 'c #nil)))) 3))
+
+    (pass-if "length (with backquoted list)"
+      (= (length `(a b c . ,#nil)) 3))
+
+    (pass-if "write (#nil)"
+      (string=? (with-output-to-string
+                  (lambda () (write #nil)))
+                "#nil"))               ; Hmmm... should be "()" ?
+
+    (pass-if "display (#nil)"
+      (string=? (with-output-to-string
+                  (lambda () (display #nil)))
+                "#nil"))               ; Ditto.
+
+    (pass-if "write (list)"
+      (string=? (with-output-to-string
+                  (lambda () (write (cons 'a #nil))))
+                "(a)"))
+
+    (pass-if "display (list)"
+      (string=? (with-output-to-string
+                  (lambda () (display (cons 'a #nil))))
+                "(a)"))
+
+    (pass-if "assq"
+      (and (equal? (assq 1 `((1 one) (2 two) . ,#nil))
+                   '(1 one))
+           (equal? (assq 3 `((1 one) (2 two) . ,#nil))
+                   #f)))
+
+    (pass-if "assv"
+      (and (equal? (assv 1 `((1 one) (2 two) . ,#nil))
+                   '(1 one))
+           (equal? (assv 3 `((1 one) (2 two) . ,#nil))
+                   #f)))
+
+    (pass-if "assoc"
+      (and (equal? (assoc 1 `((1 one) (2 two) . ,#nil))
+                   '(1 one))
+           (equal? (assoc 3 `((1 one) (2 two) . ,#nil))
+                   #f)))
+
+    (pass-if "with-fluids*"
+      (let ((f (make-fluid))
+            (g (make-fluid)))
+        (with-fluids* (cons f (cons g #nil))
+                      '(3 4)
+                      (lambda ()
+                        (and (eq? (fluid-ref f) 3)
+                             (eq? (fluid-ref g) 4))))))
+
+    (pass-if "append!"
+      (let ((a (copy-tree '(1 2 3)))
+            (b (copy-tree `(4 5 6 . ,#nil)))
+            (c (copy-tree '(7 8 9)))
+            (d (copy-tree `(a b c . ,#nil))))
+        (equal? (append! a b c d)
+                `(1 2 3 4 5 6 7 8 9 a b c . ,#nil))))
+
+    (pass-if "last-pair"
+      (equal? (last-pair `(1 2 3 4 5 . ,#nil))
+              (cons 5 #nil)))
+
+    (pass-if "reverse"
+      (equal? (reverse `(1 2 3 4 5 . ,#nil))
+              '(5 4 3 2 1)))            ; Hmmm... is this OK, or
                                        ; should it be
-                                       ; `(5 4 3 2 1 . ,%nil) ?
-
-       (pass-if "reverse!"
-          (equal? (reverse! (copy-tree `(1 2 3 4 5 . ,%nil)))
-                 '(5 4 3 2 1)))        ; Ditto.
-
-       (pass-if "list-ref"
-          (eq? (list-ref `(0 1 2 3 4 . ,%nil) 4) 4))
-
-       (pass-if-exception "list-ref"
-         exception:out-of-range
-          (eq? (list-ref `(0 1 2 3 4 . ,%nil) 6) 6))
+                                       ; `(5 4 3 2 1 . ,#nil) ?
 
-       (pass-if "list-set!"
-         (let ((l (copy-tree `(0 1 2 3 4 . ,%nil))))
-           (list-set! l 4 44)
-           (= (list-ref l 4) 44)))
+    (pass-if "reverse!"
+      (equal? (reverse! (copy-tree `(1 2 3 4 5 . ,#nil)))
+              '(5 4 3 2 1)))            ; Ditto.
 
-       (pass-if-exception "list-set!"
-         exception:out-of-range
-         (let ((l (copy-tree `(0 1 2 3 4 . ,%nil))))
-           (list-set! l 6 44)
-           (= (list-ref l 6) 44)))
+    (pass-if "list-ref"
+      (eq? (list-ref `(0 1 2 3 4 . ,#nil) 4) 4))
 
-       (pass-if "list-cdr-set!"
-         (let ((l (copy-tree `(0 1 2 3 4 . ,%nil))))
-           (and (begin
-                  (list-cdr-set! l 4 44)
-                  (equal? l '(0 1 2 3 4 . 44)))
-                (begin
-                  (list-cdr-set! l 3 `(new . ,%nil))
-                  (equal? l `(0 1 2 3 new . ,%nil))))))
+    (pass-if-exception "list-ref"
+                       exception:out-of-range
+                       (eq? (list-ref `(0 1 2 3 4 . ,#nil) 6) 6))
 
-       (pass-if-exception "list-cdr-set!"
-         exception:out-of-range
-         (let ((l (copy-tree `(0 1 2 3 4 . ,%nil))))
-           (list-cdr-set! l 6 44)))
+    (pass-if "list-set!"
+      (let ((l (copy-tree `(0 1 2 3 4 . ,#nil))))
+        (list-set! l 4 44)
+        (= (list-ref l 4) 44)))
 
-        (pass-if "memq"
-          (equal? (memq 'c `(a b c d . ,%nil)) `(c d . ,%nil)))
+    (pass-if-exception "list-set!"
+                       exception:out-of-range
+                       (let ((l (copy-tree `(0 1 2 3 4 . ,#nil))))
+                         (list-set! l 6 44)
+                         (= (list-ref l 6) 44)))
 
-        (pass-if "memv"
-          (equal? (memv 'c `(a b c d . ,%nil)) `(c d . ,%nil)))
+    (pass-if "list-cdr-set!"
+      (let ((l (copy-tree `(0 1 2 3 4 . ,#nil))))
+        (and (begin
+               (list-cdr-set! l 4 44)
+               (equal? l '(0 1 2 3 4 . 44)))
+             (begin
+               (list-cdr-set! l 3 `(new . ,#nil))
+               (equal? l `(0 1 2 3 new . ,#nil))))))
 
-        (pass-if "member"
-          (equal? (member "c" `("a" "b" "c" "d" . ,%nil)) `("c" "d" . ,%nil)))
+    (pass-if-exception "list-cdr-set!"
+                       exception:out-of-range
+                       (let ((l (copy-tree `(0 1 2 3 4 . ,#nil))))
+                         (list-cdr-set! l 6 44)))
 
-       (pass-if "list->vector"
-          (equal? '#(1 2 3) (list->vector `(1 2 3 . ,%nil))))
+    (pass-if "memq"
+      (equal? (memq 'c `(a b c d . ,#nil)) `(c d . ,#nil)))
 
-       (pass-if "list->vector"
-          (equal? '#(1 2 3) (list->vector `(1 2 3 . ,%nil))))
+    (pass-if "memv"
+      (equal? (memv 'c `(a b c d . ,#nil)) `(c d . ,#nil)))
 
-       (pass-if "list->weak-vector"
-          (equal? (weak-vector 1 2 3) (list->weak-vector `(1 2 3 . ,%nil))))
+    (pass-if "member"
+      (equal? (member "c" `("a" "b" "c" "d" . ,#nil)) `("c" "d" . ,#nil)))
 
-       (pass-if "sorted?"
-         (and (sorted? `(1 2 3 . ,%nil) <)
-              (not (sorted? `(1 6 3 . ,%nil) <))))
+    (pass-if "list->vector"
+      (equal? '#(1 2 3) (list->vector `(1 2 3 . ,#nil))))
 
-       (pass-if "merge"
-          (equal? (merge '(1 4 7 10)
-                        (merge `(2 5 8 11 . ,%nil)
-                               `(3 6 9 12 . ,%nil)
-                               <)
-                        <)
-                 `(1 2 3 4 5 6 7 8 9 10 11 12 . ,%nil)))
+    (pass-if "list->vector"
+      (equal? '#(1 2 3) (list->vector `(1 2 3 . ,#nil))))
 
-       (pass-if "merge!"
-          (equal? (merge! (copy-tree '(1 4 7 10))
-                         (merge! (copy-tree `(2 5 8 11 . ,%nil))
-                                 (copy-tree `(3 6 9 12 . ,%nil))
-                                 <)
-                        <)
-                 `(1 2 3 4 5 6 7 8 9 10 11 12 . ,%nil)))
+    (pass-if "list->weak-vector"
+      (equal? (weak-vector 1 2 3) (list->weak-vector `(1 2 3 . ,#nil))))
 
-       (pass-if "sort"
-          (equal? (sort `(1 5 3 8 4 . ,%nil) <) '(1 3 4 5 8)))
+    (pass-if "sorted?"
+      (and (sorted? `(1 2 3 . ,#nil) <)
+           (not (sorted? `(1 6 3 . ,#nil) <))))
 
-       (pass-if "stable-sort"
-          (equal? (stable-sort `(1 5 3 8 4 . ,%nil) <) '(1 3 4 5 8)))
+    (pass-if "merge"
+      (equal? (merge '(1 4 7 10)
+                     (merge `(2 5 8 11 . ,#nil)
+                            `(3 6 9 12 . ,#nil)
+                            <)
+                     <)
+              `(1 2 3 4 5 6 7 8 9 10 11 12 . ,#nil)))
 
-       (pass-if "sort!"
-          (equal? (sort! (copy-tree `(1 5 3 8 4 . ,%nil)) <)
-                 '(1 3 4 5 8)))
+    (pass-if "merge!"
+      (equal? (merge! (copy-tree '(1 4 7 10))
+                      (merge! (copy-tree `(2 5 8 11 . ,#nil))
+                              (copy-tree `(3 6 9 12 . ,#nil))
+                              <)
+                      <)
+              `(1 2 3 4 5 6 7 8 9 10 11 12 . ,#nil)))
 
-       (pass-if "stable-sort!"
-          (equal? (stable-sort! (copy-tree `(1 5 3 8 4 . ,%nil)) <)
-                 '(1 3 4 5 8)))
+    (pass-if "sort"
+      (equal? (sort `(1 5 3 8 4 . ,#nil) <) '(1 3 4 5 8)))
 
-       )
+    (pass-if "stable-sort"
+      (equal? (stable-sort `(1 5 3 8 4 . ,#nil) <) '(1 3 4 5 8)))
 
-      (with-test-prefix "value preservation"
+    (pass-if "sort!"
+      (equal? (sort! (copy-tree `(1 5 3 8 4 . ,#nil)) <)
+              '(1 3 4 5 8)))
 
-        (pass-if "car"
-          (eq? (car (cons %nil 'a)) %nil))
+    (pass-if "stable-sort!"
+      (equal? (stable-sort! (copy-tree `(1 5 3 8 4 . ,#nil)) <)
+              '(1 3 4 5 8))))
+  
 
-        (pass-if "cdr"
-          (eq? (cdr (cons 'a %nil)) %nil))
+  (with-test-prefix "value preservation"
 
-        (pass-if "vector-ref"
-          (eq? (vector-ref (vector %nil) 0) %nil))
+    (pass-if "car"
+      (eq? (car (cons #nil 'a)) #nil))
 
-       )
+    (pass-if "cdr"
+      (eq? (cdr (cons 'a #nil)) #nil))
 
-      ))
+    (pass-if "vector-ref"
+      (eq? (vector-ref (vector #nil) 0) #nil))))
 
-(if (defined? '%nil)
-    (use-modules (lang elisp interface)))
 
-(if (defined? '%nil)
+;;;
+;;; elisp
+;;;
 
-    (with-test-prefix "elisp"
+(with-test-prefix "elisp"
 
-      (define (elisp-pass-if expr expected)
-       (pass-if (with-output-to-string
-                 (lambda ()
-                   (write expr)))
-                (let ((calc (with-output-to-string
-                             (lambda ()
-                               (write (eval-elisp expr))))))
-                  (string=? calc expected))))
+  (define (elisp-pass-if expr expected)
+    (pass-if (with-output-to-string
+               (lambda ()
+                 (write expr)))
+      (let ((calc (with-output-to-string
+                    (lambda ()
+                      (write (compile expr #:from 'elisp #:to 'value))))))
+        (string=? calc expected))))
       
-      (define (elisp-pass-if/maybe-error key expr expected)
-       (pass-if (with-output-to-string (lambda () (write expr)))
-                (string=?
-                  (catch key
-                         (lambda ()
-                           (with-output-to-string
-                             (lambda () (write (eval-elisp expr)))))
-                         (lambda (k . args)
-                           (format (current-error-port)
-                                   "warning: caught ~a: ~a\n" k args)
-                           (throw 'unresolved)))
-                  expected)))
-
-      (elisp-pass-if '(and #f) "#f")
-      (elisp-pass-if '(and #t) "#t")
-      (elisp-pass-if '(and nil) "#nil")
-      (elisp-pass-if '(and t) "#t")
-      (elisp-pass-if '(and) "#t")
-      (elisp-pass-if '(cond (nil t) (t 3)) "3")
-      (elisp-pass-if '(cond (nil t) (t)) "#t")
-      (elisp-pass-if '(cond (nil)) "#nil")
-      (elisp-pass-if '(cond) "#nil")
-      (elisp-pass-if '(if #f 'a 'b) "b")
-      (elisp-pass-if '(if #t 'a 'b) "a")
-      (elisp-pass-if '(if '() 'a 'b) "b")
-      (elisp-pass-if '(if nil 'a 'b) "b")
-      (elisp-pass-if '(if nil 1 2 3 4) "4")
-      (elisp-pass-if '(if nil 1 2) "2")
-      (elisp-pass-if '(if nil 1) "#nil")
-      (elisp-pass-if '(if t 1 2) "1")
-      (elisp-pass-if '(if t 1) "1")
-      (elisp-pass-if '(let (a) a) "#nil")
-      (elisp-pass-if '(let* (a) a) "#nil")
-      (elisp-pass-if '(let* ((a 1) (b (* a 2))) b) "2")
-      (elisp-pass-if '(memq '() '(())) "(())")
-      (elisp-pass-if '(memq '() '(nil)) "(#nil)")
-      (elisp-pass-if '(memq '() '(t)) "#nil")
-      (elisp-pass-if '(memq nil '(())) "(())")
-      (elisp-pass-if '(memq nil '(nil)) "(#nil)")
-      (elisp-pass-if '(memq nil (list nil)) "(#nil)")
-      (elisp-pass-if '(null '#f) "#t")
-      (elisp-pass-if '(null '()) "#t")
-      (elisp-pass-if '(null 'nil) "#t")
-      (elisp-pass-if '(null nil) "#t")
-      (elisp-pass-if '(or 1 2 3) "1")
-      (elisp-pass-if '(or nil t nil) "#t")
-      (elisp-pass-if '(or nil) "#nil")
-      (elisp-pass-if '(or t nil t) "#t")
-      (elisp-pass-if '(or t) "#t")
-      (elisp-pass-if '(or) "#nil")
-      (elisp-pass-if '(prog1 1 2 3) "1")
-      (elisp-pass-if '(prog2 1 2 3) "2")
-      (elisp-pass-if '(progn 1 2 3) "3")
-      (elisp-pass-if '(while nil 1) "#nil")
+  (define (elisp-pass-if/maybe-error key expr expected)
+    (pass-if (with-output-to-string (lambda () (write expr)))
+      (string=?
+       (catch key
+         (lambda ()
+           (with-output-to-string
+             (lambda () (write (eval-elisp expr)))))
+         (lambda (k . args)
+           (format (current-error-port)
+                   "warning: caught ~a: ~a\n" k args)
+           (throw 'unresolved)))
+       expected)))
+
+  (elisp-pass-if '(and #f) "#f")
+  (elisp-pass-if '(and #t) "#t")
+  (elisp-pass-if '(and nil) "#nil")
+  (elisp-pass-if '(and t) "#t")
+  (elisp-pass-if '(and) "#t")
+  (elisp-pass-if '(cond (nil t) (t 3)) "3")
+  (elisp-pass-if '(cond (nil t) (t)) "#t")
+  (elisp-pass-if '(cond (nil)) "#nil")
+  (elisp-pass-if '(cond) "#nil")
+  (elisp-pass-if '(if #f 'a 'b) "b")
+  (elisp-pass-if '(if #t 'a 'b) "a")
+  (elisp-pass-if '(if nil 'a 'b) "b")
+  (elisp-pass-if '(if nil 1 2 3 4) "4")
+  (elisp-pass-if '(if nil 1 2) "2")
+  (elisp-pass-if '(if nil 1) "#nil")
+  (elisp-pass-if '(if t 1 2) "1")
+  (elisp-pass-if '(if t 1) "1")
+  (elisp-pass-if '(let (a) a) "#nil")
+  (elisp-pass-if '(let* (a) a) "#nil")
+  (elisp-pass-if '(let* ((a 1) (b (* a 2))) b) "2")
+  (elisp-pass-if '(null nil) "#t")
+  (elisp-pass-if '(or 1 2 3) "1")
+  (elisp-pass-if '(or nil t nil) "#t")
+  (elisp-pass-if '(or nil) "#nil")
+  (elisp-pass-if '(or t nil t) "#t")
+  (elisp-pass-if '(or t) "#t")
+  (elisp-pass-if '(or) "#nil")
+  (elisp-pass-if '(prog1 1 2 3) "1")
+  (elisp-pass-if '(prog2 1 2 3) "2")
+  (elisp-pass-if '(progn 1 2 3) "3")
+  (elisp-pass-if '(while nil 1) "#nil")
       
-      (elisp-pass-if '(defun testf (x y &optional o &rest r) (list x y o r)) 
"testf")
-      (elisp-pass-if '(testf 1 2) "(1 2 #nil #nil)")
-      (elisp-pass-if '(testf 1 2 3 4 5 56) "(1 2 3 (4 5 56))")
-      ;; NB `lambda' in Emacs is self-quoting, but that's only after
-      ;; loading the macro definition of lambda in subr.el.
-      (elisp-pass-if '(function (lambda (x y &optional o &rest r) (list x y o 
r))) "(lambda (x y &optional o &rest r) (list x y o r))")
-      (elisp-pass-if '(funcall (lambda (x y &optional o &rest r) (list x y o 
r)) 1 2 3 4) "(1 2 3 (4))")
-
-      (elisp-pass-if '(apply (lambda (x y &optional o &rest r) (list x y o r)) 
1 2 3 nil)
-                     "(1 2 3 #nil)")
+  (elisp-pass-if '(defun testf (x y &optional o &rest r) (list x y o r)) 
"testf")
+  (elisp-pass-if '(testf 1 2) "(1 2 #nil #nil)")
+  (elisp-pass-if '(testf 1 2 3 4 5 56) "(1 2 3 (4 5 56))")
+  ;; NB `lambda' in Emacs is self-quoting, but that's only after
+  ;; loading the macro definition of lambda in subr.el.
+  (elisp-pass-if '(funcall (lambda (x y &optional o &rest r) (list x y o r)) 1 
2 3 4) "(1 2 3 (4))")
+
+  (elisp-pass-if '(apply (lambda (x y &optional o &rest r) (list x y o r)) 1 2 
3 nil)
+                 "(1 2 3 #nil)")
       
-      (elisp-pass-if '(setq x 3) "3")
-      (elisp-pass-if '(defvar x 4) "x")
-      (elisp-pass-if 'x "3")
-
-      ))
+  (elisp-pass-if '(setq x 3) "3")
+  (elisp-pass-if '(defvar x 4) "x")
+  (elisp-pass-if 'x "3")
+
+  ;; wingo 9 april 2010: the following 10 tests are currently failing. the if &
+  ;; null tests are good, but I think some of the memq tests are bogus, given
+  ;; our current thoughts on equalty and nil; though they should succeed with
+  ;; memv and member in the elisp case. Also I think the function test is 
bogus.
+  #;
+  (elisp-pass-if '(if '() 'a 'b) "b")
+  #;
+  (elisp-pass-if '(null '#f) "#t")
+  #;
+  (elisp-pass-if '(null '()) "#t")
+  #;
+  (elisp-pass-if '(null 'nil) "#t")
+  #;
+  (elisp-pass-if '(memq '() '(())) "(())")
+  #;
+  (elisp-pass-if '(memq '() '(nil)) "(#nil)")
+  #;
+  (elisp-pass-if '(memq '() '(t)) "#nil")
+  #;
+  (elisp-pass-if '(memq nil '(())) "(())")
+  #;
+  (elisp-pass-if '(memq nil '(nil)) "(#nil)")
+  #;
+  (elisp-pass-if '(memq nil (list nil)) "(#nil)")
+  #;
+  (elisp-pass-if '(function (lambda (x y &optional o &rest r) (list x y o r))) 
"(lambda (x y &optional o &rest r) (list x y o r))")
+  )
 
-(set! %load-should-autocompile *old-%load-should-autocompile*)
-(debug-set! stack *old-stack-level*)
 
-)
 ;;; elisp.test ends here
diff --git a/test-suite/tests/load.test b/test-suite/tests/load.test
index 59f9dbb..50e5fa7 100644
--- a/test-suite/tests/load.test
+++ b/test-suite/tests/load.test
@@ -1,7 +1,7 @@
 ;;;; load.test --- test LOAD and path searching functions  -*- scheme -*-
 ;;;; Jim Blandy <address@hidden> --- September 1999
 ;;;;
-;;;;   Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc.
+;;;;   Copyright (C) 1999, 2001, 2006, 2010 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -115,13 +115,13 @@
 (try-search-with-extensions path "ugly.scm" extensions "dir3/ugly.scm")
 (try-search-with-extensions path "ugly.ss"  extensions #f)
 
-(if (defined? '%nil)
-    ;; Check that search-path accepts Elisp nil-terminated lists for
-    ;; PATH and EXTENSIONS.
-    (with-test-prefix "elisp-nil"
-      (set-cdr! (last-pair path) %nil)
-      (set-cdr! (last-pair extensions) %nil)
-      (try-search-with-extensions path "ugly.scm" extensions "dir3/ugly.scm")
-      (try-search-with-extensions path "ugly.ss"  extensions #f)))
+;; Check that search-path accepts Elisp nil-terminated lists for
+;; PATH and EXTENSIONS.
+(with-test-prefix "elisp-nil"
+  (set-cdr! (last-pair path) 
+#nil)
+  (set-cdr! (last-pair extensions) #nil)
+  (try-search-with-extensions path "ugly.scm" extensions "dir3/ugly.scm")
+  (try-search-with-extensions path "ugly.ss"  extensions #f))
       
 (delete-tree temp-dir)


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]