add exception_on_error optional arg to primitive-load-path
authorAndy Wingo <wingo@pobox.com>
Wed, 3 Jun 2009 07:48:16 +0000 (09:48 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 3 Jun 2009 20:20:55 +0000 (22:20 +0200)
commit0fb81f95b0222c5ba49efd3e36cf797df54c0863
tree4fa082789891713ede9e62ef209ff13cccf30231
parent1d022387c8f2615cc94a27109db9b9e02d7d7831
add exception_on_error optional arg to primitive-load-path

* libguile/init.c (scm_load_startup_files): Use
  scm_c_primitive_load_path.

* libguile/load.c (scm_primitive_load_path): Add an optional arg,
  exception_on_error, which if #f will cause primitive-load-path to just
  return #f if no file is found. This is to help out the semantics of
  try-module-autoload. We can't just catch misc-error, because loading
  the file could raise any exception.
  (scm_c_primitive_load_path): Add the extra arg to
  scm_primitive_load_path.

* libguile/load.h: Adapt scm_primitive_load_path prototype.

* module/ice-9/boot-9.scm (try-module-autoload): Refactor slightly to be
  clearer.
libguile/init.c
libguile/load.c
libguile/load.h
module/ice-9/boot-9.scm