bpt/guile.git
14 years agoadd module-export-all!
Andy Wingo [Tue, 27 Apr 2010 20:57:54 +0000 (22:57 +0200)]
add module-export-all!

* module/ice-9/boot-9.scm (module-export-all!): New function, exports
  all current and future local variables from a module.

14 years agoMerge branch 'wip-module-namespaces'
Andy Wingo [Tue, 27 Apr 2010 20:04:33 +0000 (22:04 +0200)]
Merge branch 'wip-module-namespaces'

14 years agocomment some global variables in modules.c
Andy Wingo [Tue, 27 Apr 2010 20:04:24 +0000 (22:04 +0200)]
comment some global variables in modules.c

* libguile/modules.c: Comment some global variables.

14 years agoFix inconsistent sectioning, causing make to fail
Neil Jerram [Mon, 26 Apr 2010 21:09:20 +0000 (22:09 +0100)]
Fix inconsistent sectioning, causing make to fail

* doc/ref/guile.texi (Top): Remove @raisesections and @lowersections
  around scheme-ideas.texi.

* doc/ref/scheme-ideas.texi (About Data, ...): Instead remove one
  "sub" from every node here apart from the chapter node.

* doc/ref/scheme-ideas.texi (Evaluating, Eval Variable, Eval
  Procedure, Eval Special, Lexical Scope, Scoping Example): Turn
  subheadings back into subsubsections, and reinstate corresponding
  menus.  (These had to become headings, rather than (sub)*sections, when
  the top level item in scheme-ideas.texi was a section.  Now it's a
  chapter again, they can go back to being (sub)*sections.)

14 years agoBring the manual organisation section a little closer to reality
Neil Jerram [Mon, 26 Apr 2010 04:24:24 +0000 (05:24 +0100)]
Bring the manual organisation section a little closer to reality

FWIW I'm not sure I like this bullety presentation - but for now this
just aligns the descriptions a bit closer to the actual chapters and
chapter contents.

* doc/ref/intro.texi (Organisation of this Manual): Cover `Hello
  Guile!' and `Hello Scheme!' chapters.  Thin out text for
  `Programming in Scheme'.  Renumber other chapters.

14 years agoAssorted minor manual changes
Neil Jerram [Mon, 26 Apr 2010 03:27:01 +0000 (04:27 +0100)]
Assorted minor manual changes

* doc/ref/guile.texi (Programming in Scheme): Remove "awful" and add
  "as opposed to having to dive into C code", to explain what we
  really mean here.  Remove incorrect para about the `Hello Scheme!'
  material.

* doc/ref/intro.texi (Interactive Programming): Change "allows" to "is
  designed for" - sounds less accidental!

* doc/ref/scheme-ideas.texi (Hello Scheme!): Remove unnecessary
  "reference", and inappropriate "randomness".

14 years agoMore `Guile and the GNU Project' text
Neil Jerram [Mon, 26 Apr 2010 01:43:54 +0000 (02:43 +0100)]
More `Guile and the GNU Project' text

* doc/ref/intro.texi (Guile and the GNU Project): More text about
  extensibility and software freedom.

14 years agoMove description of manual organisation from Preface to Introduction
Neil Jerram [Sun, 25 Apr 2010 17:53:40 +0000 (18:53 +0100)]
Move description of manual organisation from Preface to Introduction

This material isn't "meta-" enough to be in the Preface, and it
supports (by its structure) some of the points that the Introduction
makes about Guile, so I think it belongs here.

* doc/ref/intro.texi (Introduction): Add `Organisation of this Manual'
  menu item and material to here...

* doc/ref/preface.texi (Preface): ...from here.

14 years agoRemove weird instruction
Neil Jerram [Sun, 25 Apr 2010 17:28:19 +0000 (18:28 +0100)]
Remove weird instruction

* doc/ref/intro.texi: Remove `Do not confuse the two.'  (Or else
  what?)

14 years agoFix typo
Neil Jerram [Sun, 25 Apr 2010 17:12:01 +0000 (18:12 +0100)]
Fix typo

* doc/ref/compiler.texi (Bytecode and Objcode): Remove extraneous
  comma.

14 years agoMove `Reporting Bugs' section out of Introduction
Neil Jerram [Sun, 25 Apr 2010 16:56:56 +0000 (17:56 +0100)]
Move `Reporting Bugs' section out of Introduction

I think it's too detailed, when compared with the other Introduction
sections.  It probably also refers to concepts that haven't been
mentioned yet, but are mentioned in the following quick tour chapter;
so let's move it there.

* doc/ref/guile.texi: Move @raisesections and @lowersections for
  tour.texi material from here to inside tour.texi.

* doc/ref/intro.texi (Introduction): Don't mention reporting problems
  in first para.  Move menu item and material for `Reporting Bugs'
  from here...

* doc/ref/tour.texi (Hello Guile!): ...to here.  Also mention
  reporting problems in the introductory para.

14 years agoMove whirlwind tour material to its own chapter
Neil Jerram [Sun, 25 Apr 2010 16:01:01 +0000 (17:01 +0100)]
Move whirlwind tour material to its own chapter

* doc/ref/guile.texi (Top): New top level `Hello Guile!' menu item;
  include new file tour.texi.

* doc/ref/intro.texi (Introduction): Remove whirlwind tour menu item
  and material from here...

* doc/ref/tour.texi: ...to new file here.

14 years agoMove Scheme introduction (Guile-independent) to its own chapter
Neil Jerram [Sun, 25 Apr 2010 12:20:17 +0000 (13:20 +0100)]
Move Scheme introduction (Guile-independent) to its own chapter

This magically fixes all the internal wordings that say "chapter"
rather than "section", and separates Guile-independent and skippable
material from material that is Guile-specific and
probably-not-skippable - which I think is helpful.

* doc/ref/guile.texi (Top): New `Hello Scheme!' menu item, and removed
  `Basic Ideas' item.  Move include of scheme-ideas.texi before
  `Programming in Scheme' chapter, using @raisesections and
  @lowersections.  Also move scheme-reading.texi to same place.

* doc/ref/scheme-ideas.texi: Change name from `Basic Ideas' (which is
  a bit boring) to `Hello Scheme!'.  Move `Further Reading' menu item
  here.

14 years agomodule-public-interface is a field in the module record
Andy Wingo [Fri, 23 Apr 2010 15:16:56 +0000 (17:16 +0200)]
module-public-interface is a field in the module record

* module/ice-9/boot-9.scm (module-public-interface)
  (set-module-public-interface!): Instead of using
  '%module-public-interface, use a field in the module instead.
  (make-module, make-autoload-interface): Adapt.

* module/ice-9/deprecated.scm (module-public-interface):
  (set-module-public-interface!): Add shims so that manually munging
  %module-public-interface should continue to work.

14 years agofix some uses of %module-public-interface
Andy Wingo [Fri, 23 Apr 2010 15:22:00 +0000 (17:22 +0200)]
fix some uses of %module-public-interface

* module/ice-9/r5rs.scm:
* module/ice-9/safe-r5rs.scm:
* module/oop/goops/save.scm:
* module/oop/goops/simple.scm:
* module/oop/goops/stklos.scm: Fix some uses of
  %module-public-interface.

14 years agomodule-public-interface in Scheme
Andy Wingo [Fri, 23 Apr 2010 15:03:34 +0000 (17:03 +0200)]
module-public-interface in Scheme

* libguile/modules.c: Consolidate all variables to the top of the file.
  (scm_module_public_interface): Dispatch to Scheme.
  (scm_post_boot_init_modules): Resolve module-public-interface.

* module/ice-9/boot-9.scm (module-public-interface): Implement in
  Scheme.

14 years agoadd submodule binders
Andy Wingo [Fri, 23 Apr 2010 14:31:09 +0000 (16:31 +0200)]
add submodule binders

* module/ice-9/boot-9.scm (module-submodule-binder)
  (set-module-submodule-binder!): New field on modules.
  (make-module, make-autoload-interface): Adapt.
  (module-ref-submodule): If we miss the submodules table, call the
  submodules binder, if any.

* module/ice-9/deprecated.scm (module-ref-submodule): Check the
  submodule binder before the deprecated look into the obarray.

14 years agomodule-{ref,define}-submodule use the submodules table
Andy Wingo [Fri, 23 Apr 2010 14:13:06 +0000 (16:13 +0200)]
module-{ref,define}-submodule use the submodules table

* module/ice-9/boot-9.scm (module-ref-submodule)
  (module-define-submodule!): Implement in terms of the
  module-submodules table, instead of looking for bindings in the value
  namespace.

* module/ice-9/deprecated.scm (module-ref-submodule):
  (module-define-submodule!): Define deprecated versions of these that
  duplicate the submodules table in the normal values namespace, for
  back compatibility.

14 years agoadd submodules field to modules
Andy Wingo [Thu, 22 Apr 2010 12:12:05 +0000 (14:12 +0200)]
add submodules field to modules

* module/ice-9/boot-9.scm (module-type, module-constructor): Add a field
  to modules, a table that will hold submodules.
  (make-module, make-autoload-interface): Adapt.

14 years agouse nested-ref-module in (system xref)
Andy Wingo [Fri, 23 Apr 2010 14:08:01 +0000 (16:08 +0200)]
use nested-ref-module in (system xref)

* module/system/xref.scm (program-callee-rev-vars): Use
  nested-ref-module instead of nested-ref.

14 years agonested module fixen to (ice-9 ls)
Andy Wingo [Fri, 23 Apr 2010 14:03:23 +0000 (16:03 +0200)]
nested module fixen to (ice-9 ls)

* module/ice-9/ls.scm (local-definitions-in, definitions-in): Use nested
  module procedures, as appropriate.
  (recursive-local-define): Fix attempt to treat null as false. Whoops..

14 years agodeprecated %app shims use module-define-submodule!
Andy Wingo [Fri, 23 Apr 2010 13:58:08 +0000 (15:58 +0200)]
deprecated %app shims use module-define-submodule!

* module/ice-9/deprecated.scm (%app, app, modules): Don't use the module
  interface to provide %app shims, use module-define-submodule! directly
  to side-effect the root module.

14 years agoresolve-module uses -module variants
Andy Wingo [Fri, 23 Apr 2010 13:55:32 +0000 (15:55 +0200)]
resolve-module uses -module variants

* module/ice-9/boot-9.scm (resolve-module): Use module-define-submodule!
  when binding the root, and nested-ref-module for the hot lookup, which
  is guaranteed to return a module or #f.

14 years agouse the define-module variants in module-name and make-modules-in
Andy Wingo [Fri, 23 Apr 2010 13:44:31 +0000 (15:44 +0200)]
use the define-module variants in module-name and make-modules-in

* module/ice-9/boot-9.scm (module-name): Use module-define-submodule!
  instead of nested-define!.
  (make-modules-in): Rewrite in terms of nested-define-module!.

14 years agonested-ref et al use module-ref-submodule; add -module nested variants
Andy Wingo [Fri, 23 Apr 2010 13:41:34 +0000 (15:41 +0200)]
nested-ref et al use module-ref-submodule; add -module nested variants

* module/ice-9/boot-9.scm: Update comments above nested-ref to include
  ref-module and define-module!.
  (nested-ref, nested-set!, nested-define!, nested-remove!): Use
  module-ref-submodule to traverse the module hierarchy.
  (nested-ref-module, nested-define-module!): New functions, like
  nested-ref and nested-define!, but operate on namespaces instead of
  values.
  (local-ref-module, local-define-module): New analogs of local-ref and
  local-define, but for namespaces.

14 years agoadd module-ref-submodule, module-define-submodule!
Andy Wingo [Fri, 23 Apr 2010 13:37:36 +0000 (15:37 +0200)]
add module-ref-submodule, module-define-submodule!

* module/ice-9/boot-9.scm (module-ref-submodule):
  (module-define-submodule!): New stubs, will be used to separate
  traversing the module tree from accessing values.

14 years agotweak to resolve-module
Andy Wingo [Fri, 23 Apr 2010 13:34:22 +0000 (15:34 +0200)]
tweak to resolve-module

* module/ice-9/boot-9.scm (resolve-module): If we found a module but it
  didn't have a public interface and we're not autoloading, just return
  the module directly instead of dispatching to make-modules-in.

14 years agofix (app modules) usage in (ice-9 session)
Andy Wingo [Fri, 23 Apr 2010 14:07:14 +0000 (16:07 +0200)]
fix (app modules) usage in (ice-9 session)

* module/ice-9/session.scm (root-modules): Fix '(app modules) usage.

14 years agodeprecate %app
Andy Wingo [Thu, 22 Apr 2010 13:25:09 +0000 (15:25 +0200)]
deprecate %app

* module/ice-9/boot-9.scm (module-name): Don't rely on (%app modules),
  use other tricks to name anonymous modules.
  (resolve-module): Instead of relying on %app, close over the root of
  the module hierarchy -- the module that was '(%app modules).

* module/ice-9/deprecated.scm (%app): Provide a compatible %app shim.

14 years agorefactorings for the module boot process
Andy Wingo [Tue, 20 Apr 2010 12:53:38 +0000 (14:53 +0200)]
refactorings for the module boot process

* module/ice-9/boot-9.scm (%app): Bind %app and (%app modules) within
  the nested hierarchy before making (guile).
  (the-root-module): Define to '(%app modules guile) together with
  the-root-module's definition.
  (resolve-module): Define a "phase 2" resolve-module that only works on the
  root module.
  (try-module-autoload): No need for stub definition, as modules.c does
  not reference this binding.
  (resolve-module): Redefine, after modules have been loaded, to
  actually do its job, without any hacks for the pre-boot phase.

  Move up the boot code before the definition of resolve-module's
  helpers.

14 years agoadd comments to resolve-module
Andy Wingo [Tue, 20 Apr 2010 11:42:21 +0000 (13:42 +0200)]
add comments to resolve-module

* module/ice-9/boot-9.scm (resolve-module): Add comments.

14 years agoformally deprecate `app'
Andy Wingo [Tue, 20 Apr 2010 11:41:41 +0000 (13:41 +0200)]
formally deprecate `app'

* module/ice-9/deprecated.scm (app): Deprecate.
* module/ice-9/boot-9.scm: Remove app definition.

14 years ago(app modules) -> (%app modules)
Andy Wingo [Thu, 22 Apr 2010 13:08:13 +0000 (15:08 +0200)]
(app modules) -> (%app modules)

* module/ice-9/debugging/breakpoints.scm (module-if-already-loaded):
  (all-loaded-modules):
* module/oop/goops/stklos.scm: Fix instances of (app modules) to be
  (%app modules).

14 years agofix comment about "local-define" and "local-remove".
Andy Wingo [Tue, 20 Apr 2010 10:42:38 +0000 (12:42 +0200)]
fix comment about "local-define" and "local-remove".

* module/ice-9/boot-9.scm: Fix comment about "local-define!", whereas
  it's "local-define". Same for "local-remove".

14 years agomodule-type defined programmatically
Andy Wingo [Tue, 20 Apr 2010 10:34:05 +0000 (12:34 +0200)]
module-type defined programmatically

* module/ice-9/boot-9.scm (make-record-type): Add an explanatory
  comment.
  (%print-module): Remove a hacky comment about redefinitions being
  difficult, because now the module-printer is called by name from
  module-type's printer.
  (module-type): Define the module type, its constructor, predicate, and
  accessors programmatically, at expansion time. Should reduce any
  errors in transcription, between adding fields and adding accessors.

* libguile/modules.c (scm_lookup_closure_module): Move an explanatory
  comment here from boot-9.scm.

14 years agoavoid primitive-eval in record-constructor
Andy Wingo [Mon, 19 Apr 2010 18:19:24 +0000 (20:19 +0200)]
avoid primitive-eval in record-constructor

* module/ice-9/boot-9.scm (record-type-vtable): Add a third field, a
  precomputed constructor. There is an unfortunate circularity here,
  though.
  (make-record-type): If the record has fewer than 20 fields,
  return a constructor pre-generated to suit. Otherwise just check the
  length, and dispatch to `apply' and not `primitive-eval'. FWIW the
  current module record has something like 12 fields.
  (record-constructor): If we're asking for the standard constructor,
  return the precomputed constructor.

14 years agomake-record-type slight refactor
Andy Wingo [Mon, 19 Apr 2010 17:33:57 +0000 (19:33 +0200)]
make-record-type slight refactor

* test-suite/tests/records.test ("records"): Add tests for printers.

* module/ice-9/boot-9.scm (make-record-type): Refactor the code that
  makes the default printer.

14 years agofilesystem trickery to scm_i_relativize_path in filesys.c; bugfix.
Andy Wingo [Mon, 19 Apr 2010 14:39:11 +0000 (16:39 +0200)]
filesystem trickery to scm_i_relativize_path in filesys.c; bugfix.

* libguile/filesys.h:
* libguile/filesys.c (scm_i_relativize_path): New function, moved here
  from fports.c. Internal for now; we can make it external though if
  people like its interface.

* libguile/fports.c (fport_canonicalize_filename): Move all of the
  tricky bits to filesys.c. Also fixes a bug in which a delimiter wasn't
  stripped.

14 years agodeprecate @bind
Andy Wingo [Mon, 19 Apr 2010 12:00:23 +0000 (14:00 +0200)]
deprecate @bind

* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (@bind): Deprecate @bind, which was a
  thread-unsafe dynamic scoping mechanism, used in the old elisp
  support. Fluids are more correct, and are probably faster, given the
  VM support for with-fluids.

* test-suite/tests/dynamic-scope.test: Remove.
* test-suite/tests/fluids.test: Move relevant tests from
  dynamic-scope.test here, recast in terms of with-fluids.

14 years agocompile-file gets #:canonicalization arg, defaults to 'relative
Andy Wingo [Mon, 19 Apr 2010 11:34:29 +0000 (13:34 +0200)]
compile-file gets #:canonicalization arg, defaults to 'relative

* module/system/base/compile.scm (compile-file, compile-and-load): Add a
  keyword arg #:canonicalization, which defaults to 'relative. In this
  way, one might compile "../module/ice-9/boot-9.scm", but the path that
  gets residualized into the .go is "ice-9/boot-9.scm".

14 years ago%file-port-name-canonicalization is a fluid
Andy Wingo [Mon, 19 Apr 2010 11:18:07 +0000 (13:18 +0200)]
%file-port-name-canonicalization is a fluid

* libguile/fports.c (fport_canonicalize_filename):
  (scm_init_fports): Change %file-port-name-canonicalization to be a
  fluid.

14 years agoadd %file-port-name-canonicalization option
Andy Wingo [Mon, 19 Apr 2010 11:14:43 +0000 (13:14 +0200)]
add %file-port-name-canonicalization option

* libguile/fports.c (%file-port-name-canonicalization): New global var.
  (fport_canonicalize_filename): New helper. If
  %file-port-name-canonicalization is 'absolute, then run file port
  names through canonicalize_path; if it's 'relative, then canonicalize
  the name, but strip off load paths; otherwise leave the port name
  alone.
  (scm_open_file): Use fport_canonicalize_filename.
  (scm_init_fports): Define %file-port-name-canonicalization.

14 years agoformatting fix
Andy Wingo [Mon, 19 Apr 2010 11:12:26 +0000 (13:12 +0200)]
formatting fix

* libguile/filesys.c (scm_canonicalize_path): Format fix.

14 years agouse procedure-minimum-arity in tests
Andy Wingo [Mon, 19 Apr 2010 10:05:27 +0000 (12:05 +0200)]
use procedure-minimum-arity in tests

* test-suite/tests/procprop.test ("procedure-arity"): Fix tests to use
  procedure-minimum-arity.

14 years agodeprecate arity access via (procedure-properties proc 'arity)
Andy Wingo [Sat, 17 Apr 2010 14:28:52 +0000 (16:28 +0200)]
deprecate arity access via (procedure-properties proc 'arity)

* libguile/procprop.h (scm_sym_arity): Deprecate. I didn't move it to
  deprecated.h though, because that might have some boot implications --
  though I didn't check.

* libguile/procprop.c (scm_procedure_properties)
  (scm_set_procedure_properties_x, scm_procedure_property)
  (scm_set_procedure_property_x): Deprecate access to a procedure's
  arity via procedure-properties. Users should use
  procedure-minimum-arity.

* module/ice-9/channel.scm (eval):
* module/ice-9/session.scm (arity):
* module/language/tree-il/analyze.scm (validate-arity): Fix up instances
  of (procedure-property x 'arity) to use procedure-minimum-arity.

14 years agoadd procedure_minimum_arity
Andy Wingo [Sat, 17 Apr 2010 14:03:51 +0000 (16:03 +0200)]
add procedure_minimum_arity

* libguile/procprop.h:
* libguile/procprop.c (scm_procedure_minimum_arity): New public
  function, will replace (procedure-property foo 'arity).

* libguile/programs.c (scm_i_program_arity): Rework to always provide
  the most permissive arity.

14 years agoremove program-name, program-documentation
Andy Wingo [Sat, 17 Apr 2010 13:17:24 +0000 (15:17 +0200)]
remove program-name, program-documentation

* libguile/programs.h:
* libguile/programs.c (scm_program_name): Remove. procedure-name is
  sufficient.

* module/system/vm/program.scm (program-name): Remove from exports list.
  (program-documentation): Remove; procedure-documentation is
  sufficient.

* libguile/debug.c (scm_procedure_name): Remove special case for
  programs.

* module/language/tree-il/analyze.scm (validate-arity): Use
  procedure-name.

* module/ice-9/documentation.scm (object-documentation): Just use
  procedure-documentation, without special cases for programs.

14 years agoscm_i_program_properties is internal; just use procedure-properties
Andy Wingo [Sat, 17 Apr 2010 13:02:56 +0000 (15:02 +0200)]
scm_i_program_properties is internal; just use procedure-properties

* libguile/programs.h:
* libguile/programs.c (scm_i_program_properties): Make internal.
  (scm_program_name): Use scm_i_program_properties.

* libguile/procprop.c (scm_procedure_properties): Use
  scm_i_program_properties, for programs.

* libguile/procs.c (scm_procedure_documentation): Use procedure-property
  to get to 'documentation, not program-property.

* module/system/vm/program.scm (program-properties, program-property):
  Remove from the exports list.
  (program-documentation): Use procedure-property.

* module/texinfo/reflection.scm (macro-arguments)
  (macro-additional-stexi)
  (object-stexi-documentation): Use procedure-property, not
  program-property.

14 years agotweaks to procprop.c
Andy Wingo [Sat, 17 Apr 2010 12:47:47 +0000 (14:47 +0200)]
tweaks to procprop.c

* libguile/procprop.c (scm_procedure_property)
  (scm_set_procedure_property_x): Fix up some variable naming.

14 years agoprocedure-properties incorporates program-properties
Andy Wingo [Sat, 17 Apr 2010 12:45:32 +0000 (14:45 +0200)]
procedure-properties incorporates program-properties

* libguile/procprop.c (overrides, overrides_lock): Rename from props and
  props_lock.
  (scm_procedure_properties): If no overrides have been set, default to
  scm_program_properties (if it's a program).
  (scm_set_procedure_properties_x): Error if 'arity is in the alist.
  (scm_procedure_property): Just do a lookup in the
  scm_procedure_properties.
  (scm_set_procedure_properties_x): Init the overrides to
  scm_procedure_properties.

14 years agofix read.bm
Andy Wingo [Sat, 17 Apr 2010 12:04:49 +0000 (14:04 +0200)]
fix read.bm

* benchmark-suite/benchmarks/read.bm (%files-to-load): psyntax-pp.scm,
  not psyntax.scm.

14 years agoMerge branch 'wip-manual-2'
Neil Jerram [Fri, 16 Apr 2010 21:26:32 +0000 (22:26 +0100)]
Merge branch 'wip-manual-2'

Conflicts:

doc/ref/api-translation.texi

14 years agofold in feedback to api-languages
Andy Wingo [Fri, 16 Apr 2010 15:43:42 +0000 (17:43 +0200)]
fold in feedback to api-languages

* doc/ref/api-languages.texi: Fold in feedback.

14 years agoNEWS tweaks for nil
Andy Wingo [Fri, 16 Apr 2010 08:35:51 +0000 (10:35 +0200)]
NEWS tweaks for nil

* NEWS: Some nil-related news fixes; after 1.9.10, I know, but hey ;-)

14 years agomore nil docs
Andy Wingo [Fri, 16 Apr 2010 07:38:29 +0000 (09:38 +0200)]
more nil docs

* doc/ref/api-languages.texi (Nil): Be a bit more thorough, and
  positive.

14 years agoadd docs on `nil'
Andy Wingo [Thu, 15 Apr 2010 22:00:39 +0000 (00:00 +0200)]
add docs on `nil'

* doc/ref/api-languages.texi (Nil): Write about `nil'.

14 years agofix bugs in ice-9 i18n demo (invalid input)
Andy Wingo [Thu, 15 Apr 2010 21:24:26 +0000 (23:24 +0200)]
fix bugs in ice-9 i18n demo (invalid input)

* doc/ref/api-i18n.texi (Accessing Locale Information): Crucial
  bugfixes.

14 years agofixes to api-i18n.texi
Andy Wingo [Thu, 15 Apr 2010 21:10:25 +0000 (23:10 +0200)]
fixes to api-i18n.texi

* doc/ref/api-i18n.texi (Character Case Mapping): Remove note about lack
  of support for multibute characters.

14 years agoflesh out docs on multiple languages a bit more
Andy Wingo [Thu, 15 Apr 2010 21:09:29 +0000 (23:09 +0200)]
flesh out docs on multiple languages a bit more

* doc/ref/api-languages.texi: Move here from api-translation. Still
  stubbed in parts, but it's getting better.
* doc/ref/Makefile.am: Adapt to api-languages.texi name change.
* doc/ref/guile.texi: Likewise.

14 years agoBump version number for 1.9.10.
Ludovic Courtès [Thu, 15 Apr 2010 20:21:40 +0000 (22:21 +0200)]
Bump version number for 1.9.10.

* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.

14 years agoImprovements to Introduction chapter
Neil Jerram [Sun, 27 Dec 2009 13:20:05 +0000 (13:20 +0000)]
Improvements to Introduction chapter

* doc/ref/intro.texi (Introduction): Change "some" to "the".
  (Guile and Scheme): "multithreading" -> "multithreaded".
  (Combining with C): Mention "libguile" as library name.
  (Guile and the GNU Project): New text.
  (Interactive Programming): New text.
  (Supporting Multiple Languages): New text, reflecting currently
  supported languages.
  (Obtaining and Installing Guile): Use @var for version placeholder.
  Remove mention of separate tutorial.

14 years agoMerge branch 'master' into wip-manual-2
Neil Jerram [Sat, 10 Apr 2010 12:32:42 +0000 (13:32 +0100)]
Merge branch 'master' into wip-manual-2

Conflicts:

doc/ref/api-procedures.texi
doc/ref/misc-modules.texi

(Caused by me removing `@page' from a couple of sections that have been modified
by others.)

14 years agoelisp.test cleanups
Andy Wingo [Fri, 9 Apr 2010 20:33:46 +0000 (22:33 +0200)]
elisp.test cleanups

* test-suite/tests/elisp.test: Use quote and #nil instead of quasiquote
  and ,#nil.

14 years agore-enable elisp test
Andy Wingo [Fri, 9 Apr 2010 12:43:49 +0000 (14:43 +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.

14 years agochange remaining %nil -> #nil
Andy Wingo [Fri, 9 Apr 2010 12:44:28 +0000 (14:44 +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.

14 years agoelisp fixes for nil, and, or
Andy Wingo [Fri, 9 Apr 2010 19:04:52 +0000 (21:04 +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.

14 years agoremove libguile/lang.h, deprecate %nil (in favor of #nil)
Andy Wingo [Fri, 9 Apr 2010 12:26:31 +0000 (14:26 +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.

14 years ago%nil -> #nil
Andy Wingo [Fri, 9 Apr 2010 12:17:04 +0000 (14:17 +0200)]
%nil -> #nil

* module/language/assembly.scm (object->assembly, assembly->object):
* module/language/elisp/compile-tree-il.scm (compile-pair):
* module/language/glil/decompile-assembly.scm (decompile-load-program):
  Change instances of %nil to #nil.

14 years agoadd read syntax for #nil
Andy Wingo [Fri, 9 Apr 2010 12:15:16 +0000 (14:15 +0200)]
add read syntax for #nil

* libguile/evalext.c (scm_self_evaluating_p): #nil is self-evaluating.

* libguile/read.c (scm_read_nil, scm_read_sharp): Add read syntax for
  #nil.

14 years agolisp nil always enabled
Andy Wingo [Fri, 9 Apr 2010 12:03:02 +0000 (14:03 +0200)]
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.

14 years agoadd debugging input and output ports
Andy Wingo [Fri, 9 Apr 2010 11:41:31 +0000 (13:41 +0200)]
add debugging input and output ports

* module/system/vm/debug.scm (*debug-input-port*):
  (*debug-output-port*): New public fluids.
  (run-debugger): Add some kwargs for input and output ports, defaulting
  to the debug input and output ports.
  (debug-pre-unwind-handler): Print to debug output port.
  (debug): Untabify.

14 years agorepl-reader only prompts if no input is available
Andy Wingo [Fri, 9 Apr 2010 11:33:20 +0000 (13:33 +0200)]
repl-reader only prompts if no input is available

* module/ice-9/boot-9.scm (repl-reader): For the default (non-readline)
  repl reader, only display the prompt if input isn't already available.
  Fixes spurious prompts in the debugger.

14 years agoRaise an error when attempting to modify the value of `%null-pointer'.
Ludovic Courtès [Thu, 8 Apr 2010 22:30:10 +0000 (00:30 +0200)]
Raise an error when attempting to modify the value of `%null-pointer'.

* libguile/foreign.c (sym_null_pointer_error): New variable.
  (null_pointer_error): New function.
  (scm_foreign_set_x): Raise an error if attempting to modify
  NULL_POINTER.
  (scm_foreign_to_bytevector): Use `null_pointer_error ()' instead of
  `scm_misc_error ()'.

* test-suite/tests/foreign.test: New file.

* test-suite/Makefile.am (SCM_TESTS): Add tests/foreign.test.

* test-suite/lib.scm (exception:null-pointer-error): New variable.

14 years agoAllocate foreign pointer objects in GC-scanned memory.
Ludovic Courtès [Thu, 8 Apr 2010 22:14:34 +0000 (00:14 +0200)]
Allocate foreign pointer objects in GC-scanned memory.

* libguile/foreign.c (scm_take_foreign_pointer): Allocate RET in
  GC-scanned memory.  This fixes a bug where the object pointed to by
  SCM_CIF in the pair returned by `cif_to_procedure ()' would be
  reclaimed (as a consequence of commit
  087aa6aa312a8d0af51fa9b2f7bfc1332ad97338).

14 years agoAvoid obsolescent C declarator with empty parentheses.
Ludovic Courtès [Thu, 8 Apr 2010 22:01:38 +0000 (00:01 +0200)]
Avoid obsolescent C declarator with empty parentheses.

* libguile/foreign.c (scm_i_foreign_call): Don't declare FUNC with a
  declarator with empty parentheses (bug #23681).

14 years agoFix `module-reverse-lookup'.
Ludovic Courtès [Thu, 8 Apr 2010 17:17:25 +0000 (19:17 +0200)]
Fix `module-reverse-lookup'.

* libguile/modules.c (scm_module_reverse_lookup): Type-check VARIABLE.
  Don't traverse the `uses' list when MODULE is #f.

* test-suite/tests/modules.test ("foundations")["module-reverse-lookup
  [pre-module-obarray]", "module-reverse-lookup [wrong-type-arg]"]: New
  tests.

14 years agoRemove `fold' from (sxml fold).
Ludovic Courtès [Thu, 8 Apr 2010 21:55:41 +0000 (23:55 +0200)]
Remove `fold' from (sxml fold).

* module/sxml/fold.scm: Use (srfi srfi-1).
  (fold): Remove.
  (fold-values): Update docstring accordingly.

* test-suite/tests/sxml.fold.test: Use (srfi srfi-1).

14 years agofix curried definitions for value defines
Andy Wingo [Thu, 8 Apr 2010 19:01:52 +0000 (21:01 +0200)]
fix curried definitions for value defines

* module/ice-9/curried-definitions.scm: Allow definitions of values with
  define and define*.
* test-suite/tests/curried-definitions.test: Add tests.

14 years agosync regs before calling scm_class_of
Andy Wingo [Thu, 8 Apr 2010 08:56:14 +0000 (10:56 +0200)]
sync regs before calling scm_class_of

* libguile/vm-i-scheme.c (class-of): Sync registers before calling
  scm_class_of.

14 years agoadd (ice-9 curried definitions)
Andy Wingo [Wed, 7 Apr 2010 22:36:53 +0000 (00:36 +0200)]
add (ice-9 curried definitions)

* module/Makefile.am:
* module/ice-9/curried-definitions.scm: New module, implementing
  SICM-style currying.

* test-suite/Makefile.am:
* test-suite/tests/curried-definitions.test: A test.

14 years agofix bug when importing bindings that were already imported and used
Andy Wingo [Wed, 7 Apr 2010 22:29:52 +0000 (00:29 +0200)]
fix bug when importing bindings that were already imported and used

* module/ice-9/boot-9.scm (module-use!, module-use-interfaces!): When
  adding the module or interface to the use list, clear the cached
  imports obarray.

  The test case is coming next.

14 years agoupdate licenses on tests imported from guile-lib
Andy Wingo [Wed, 7 Apr 2010 19:37:50 +0000 (21:37 +0200)]
update licenses on tests imported from guile-lib

* test-suite/tests/sxml.fold.test:
* test-suite/tests/sxml.ssax.test:
* test-suite/tests/sxml.transform.test:
* test-suite/tests/sxml.xpath.test:
* test-suite/tests/texinfo.docbook.test:
* test-suite/tests/texinfo.serialize.test:
* test-suite/tests/texinfo.string-utils.test:
* test-suite/tests/texinfo.test: Update licenses to GPL or LGPL 3+, and
  update copyright holders to be FSF (where that is the case). Copyright
  holders who are not FSF have their code in GPL/LGPL-compatible
  licesnse.

14 years agoadd docs and tests for array->list
Andy Wingo [Wed, 7 Apr 2010 19:04:37 +0000 (21:04 +0200)]
add docs and tests for array->list

* libguile/generalized-arrays.c (scm_array_to_list): Add docs.
* test-suite/tests/arrays.test ("array->list"): Add tests.

14 years agoupdate NEWS for 1.9.10
Andy Wingo [Tue, 6 Apr 2010 22:26:48 +0000 (00:26 +0200)]
update NEWS for 1.9.10

* NEWS: Update for new 1.9.10 entries.

14 years agovery important fix to (system repl command)
Andy Wingo [Tue, 6 Apr 2010 22:09:53 +0000 (00:09 +0200)]
very important fix to (system repl command)

* module/system/repl/command.scm (language): s/Have fun/Happy hacking/.
  Heh.

14 years agodeprecated sc-expand in deprecated (ice-9 syncase)
Andy Wingo [Tue, 6 Apr 2010 22:05:34 +0000 (00:05 +0200)]
deprecated sc-expand in deprecated (ice-9 syncase)

* module/ice-9/syncase.scm: Export sc-expand as macroexpand.

14 years agoUpdate NEWS to reflect the current state
Andy Wingo [Tue, 6 Apr 2010 22:01:35 +0000 (00:01 +0200)]
Update NEWS to reflect the current state

* NEWS: Update a number of old entries.

14 years agoremove transient 1.9.9 entries from the NEWS
Andy Wingo [Tue, 6 Apr 2010 21:58:51 +0000 (23:58 +0200)]
remove transient 1.9.9 entries from the NEWS

* NEWS: Cull 1.9.9 entries.

14 years agofinish ffi docs
Andy Wingo [Tue, 6 Apr 2010 21:17:10 +0000 (23:17 +0200)]
finish ffi docs

* libguile/foreign.c: Some doc tweaks.
* doc/ref/api-foreign.texi: Finish FFI docs.

14 years agomore ffi docs
Andy Wingo [Mon, 5 Apr 2010 22:45:35 +0000 (00:45 +0200)]
more ffi docs

* libguile/foreign.c (scm_make_foreign_function): Doc a little.
* doc/ref/api-foreign.texi (Foreign Function Interface): Document some
  more.

14 years agocopyright dates
Michael Gran [Sat, 3 Apr 2010 13:46:23 +0000 (06:46 -0700)]
copyright dates

* libguile/unidata_to_charset.pl: change copyright date
* test-suite/tests/srfi-14.test: change copyright date

14 years agoRemove obsolete docs for multi-byte text
Michael Gran [Sat, 3 Apr 2010 05:25:30 +0000 (22:25 -0700)]
Remove obsolete docs for multi-byte text

These describe the initial, unimplemented plan for Unicode
support.  These have been overcome by events.

* doc/mbapi.texi: removed
* doc/mltext.texi: removed

14 years agoUpdate standard character sets to Unicode 5.2
Michael Gran [Sat, 3 Apr 2010 04:12:55 +0000 (21:12 -0700)]
Update standard character sets to Unicode 5.2

* srfi-14.i.c: all character ranges updated to Unicode 5.2

14 years agoUnicode data parsing script incorrect for char-set:ascii
Michael Gran [Sat, 3 Apr 2010 04:08:42 +0000 (21:08 -0700)]
Unicode data parsing script incorrect for char-set:ascii

char-set:ascii is the only char-set consisting of a single contiguous
range, and there was an off-by-one error for that case.

* libguile/unidata_to_charset.pl (compute): fix off-by-one

14 years agodeprecate dynamic-args-call, and update docs some more
Andy Wingo [Thu, 1 Apr 2010 22:34:49 +0000 (00:34 +0200)]
deprecate dynamic-args-call, and update docs some more

* libguile/deprecated.h (scm_dynamic_args_call): Deprecate.
* libguile/deprecated.c:
* libguile/dynl.h:
* libguile/dynl.c:

* doc/ref/api-foreign.texi: More doc updates.

14 years agoadd api-foreign.texi
Andy Wingo [Thu, 1 Apr 2010 22:23:24 +0000 (00:23 +0200)]
add api-foreign.texi

* doc/ref/api-foreign.texi: New file.
* doc/ref/api-modules.texi: Reorganize bits about dynamic linking into
  api-foreign.

* doc/ref/guile.texi:
* doc/ref/Makefile.am: Adapt to api-foreign.texi.

14 years agofix vector-ref and vector-set opcodes for weak vectors
Andy Wingo [Thu, 1 Apr 2010 07:05:59 +0000 (09:05 +0200)]
fix vector-ref and vector-set opcodes for weak vectors

* libguile/vectors.h (SCM_I_IS_NONWEAK_VECTOR): New internal predicate.
* libguile/vm-i-scheme.c (vector-ref, vector-set): Only inline access to
  nonweak vectors.

14 years agomore fixes to equal? for arrays
Andy Wingo [Wed, 31 Mar 2010 22:18:44 +0000 (00:18 +0200)]
more fixes to equal? for arrays

* libguile/array-map.c (array_compare, scm_array_equal_p): Rewrite as
  something that operates on the generic array handle infrastructure.
  Based on array->list.
  (scm_i_array_equal_p): Change the docs, as array-equal? is now the same
  as equal?, except that it typechecks its args.

* doc/ref/api-compound.texi (Array Procedures): Update array-equal?
  docs.

* libguile/deprecated.h:
* libguile/deprecated.c (scm_raequal): Deprecate.

* libguile/bytevectors.c (scm_bytevector_eq_p): Bugfix: bytevectors are
  bytevector=? only if their element type is the same.

* libguile/eq.c (scm_equal_p): Only dispatch to scm_array_equal_p if
  both args are arrays (generically).

* test-suite/tests/arrays.test ("equal?"): Add some more tests.

14 years agofix array bugs in ecmascript
Andy Wingo [Wed, 31 Mar 2010 20:31:11 +0000 (22:31 +0200)]
fix array bugs in ecmascript

* module/language/ecmascript/array.scm (pput, *array-prototype*): Fix
  bugs in ecmascript array runtime.

14 years agofix bug in ash opcode
Andy Wingo [Wed, 31 Mar 2010 20:29:29 +0000 (22:29 +0200)]
fix bug in ash opcode

* libguile/vm-i-scheme.c (ash): Fix embarrassing bug in (ash 1 32).
* test-suite/tests/bit-operations.test ("bitshifts on word boundaries"):
  Add tests.