According to the previous wording, omitting all optional arguments led
to empty interface. That however was not the case and was only a
documentation bug (as confirmed by wingo on IRC). So let us fix that.
* doc/ref/api-modules.texi (Using Guile Modules): Fix implication of
omitting optional arguments.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.
This is a followup to cb14fd2143.
* doc/ref/api-modules.texi (Creating Guile Modules): Remove bit that
says all the bindings of an autoloaded module become available.
* doc/ref/api-modules.texi (Creating Guile Modules): Document
#:re-export-and-replace.
* module/ice-9/boot-9.scm (module-replacements): New module field.
(make-module, make-autoload-interface): Initialize replacements to an
empty hash table.
(resolve-interface): Propagate replacement info when making custom
interfaces.
(define-module): Parse a #:re-export-and-replace keyword arg.
(define-module*): Handle #:re-export-and-replace.
(module-export!, module-re-export!): Add a keyword arg to indicate
whether to replace or not.
(module-replace!): Call module-export! with #:replace? #t.
(duplicate-handlers): Update replace duplicate handler to look for
replacement info on the interfaces.
* module/srfi/srfi-18.scm (srfi):
* module/srfi/srfi-34.scm (srfi): Update to #:re-export-and-replace
raise-continuable as raise.
* doc/ref/api-evaluation.texi (Compilation): Document the -O options.
* doc/ref/api-modules.texi (Using Guile Modules): @@ docs refer to
declarative modules.
(Creating Guile Modules): Use when for 1-armed if.
(Declarative Modules): Make implications of declarative bindings more
explicit, and explicitly document ways to disable the optimization.
* module/language/tree-il/optimize.scm (tree-il-optimizations): Punt
letrectification to -O2.
* doc/ref/api-modules.texi (Declarative Modules): New subsection.
* module/ice-9/boot-9.scm (module): Change eval-closure slot, which was
deprecated and unused, to be a "declarative?" slot, indicating that
definitions from the module are declarative.
(user-modules-declarative?): New parameter.
(make-fresh-user-module): Set declarative according to parameter.
(define-module*, define-module): Add #:declarative? keyword argument,
defaulting to the value of user-modules-declarative? parameter when
the module was expanded.
(guile-user): This module is not declarative.
* module/language/tree-il/letrectify.scm (compute-declarative-toplevels):
Use the new declarative? module flag.
Fixes <http://bugs.gnu.org/17869>.
Reported and fixed by Alexei Matveev <alexei.matveev@gmail.com>.
* doc/ref/api-modules.texi (Accessing Modules from C): Change documented
return type of 'scm_c_export' to 'void' to reflect reality.
* THANKS: Add Alexei Matveev to the fixes section.
* libguile/debug.c (scm_local_eval):
libguile/ports.c (scm_current_warning_port):
libguile/strports.c (scm_eval_string_in_module): Perform
lazy-initialization while holding a mutex. Use SCM_UNDEFINED as the
uninitialized value. Use 'scm_c_*_variable'.
* doc/ref/api-modules.texi (Accessing Modules from C): Fix
'my_eval_string' example to be thread-safe.
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-modules.texi:
* doc/ref/compiler.texi:
* doc/ref/web.texi: Make Texinfo function headers more consistent.
Change lesser used keyword notation to the predominant form.
* doc/ref/api-procedures.texi: Fix an argument name in a header that should
use repeated argument notation.
* doc/ref/srfi-modules.texi: Update references in Texinfo function
definition body to match previously updated variable notation in
definition header.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_sym2var): Deprecate this function.
* libguile/modules.h:
* libguile/modules.c (scm_module_ensure_local_variable): New public
function, replacing scm_sym2var with a true definep, without going
through eval closures (which are deprecated).
(scm_current_module): Rework to do something sensible before modules
are booted.
(scm_module_lookup, scm_lookup): Refactor to use scm_module_variable.
(scm_module_define, scm_define): Refactor to use
scm_module_ensure_local_variable.
* libguile/vm-i-system.c (define!): Use scm_define.
* libguile/vm.c (resolve_variable): Use scm_module_lookup.
* libguile/macros.c (scm_make_syntax_transformer): Use
scm_module_variable.
* libguile/gdbint.c (gdb_binding): Use scm_define.
* doc/ref/api-modules.texi (Accessing Modules from C): Add docs for
scm_module_ensure_local_variable.
* doc/ref/api-modules.texi (Modules): Add subsection for "Modules and
the File System". Move "Included Guile Modules" to the end. Move
"Module System Reflection" after "Variables", as we need to know about
variables. Flesh out "Module System Reflection" a bit, with docs on
module-ref, module-variable, and other bindings. General editing.
* doc/ref/api-modules.texi (Accessing Modules from C): Use the phrase "C
Function" instead of "C Procedure". Enclose multiple-word type names
in braces. Reported by Dale P. Smith.
* doc/ref/Makefile.am:
* doc/ref/guile.texi:
* doc/ref/scheme-debugging.texi: Remove scheme-debugging.texi, which
only described tracing. Tracing documentation is now in
api-debugging.
* doc/ref/scheme-using.texi (Evaluating Scheme Code): Remove reference
to source traps, as that section is going away.
* doc/ref/api-modules.texi (Included Guile Modules): Remove reference to
Tracing. This section is a little silly, anyway...
* doc/ref/api-evaluation.texi (VM Behaviour): Remove section, it is in
api-debugging now.
* doc/ref/api-debug.texi (Stacks, Frames): Rename sections from
"Examining the Stack" and "Examining Stack Frames", respectively.
(Traps): Update for current API. A big and not-quite-finished update.
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.)
* 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.
* module/ice-9/boot-9.scm (try-load-module, try-module-autoload): Check
for version argument and use `find-versioned-module' if present.
* module/ice-9/boot-9.scm (find-versioned-module, version-matches?)
(module-version, set-module-version!, version-matches?): New
functions.
* module/ice-9/boot-9.scm (module-type, make-module, resolve-module)
(try-load-module, process-define-module, make-autoload-interface)
(compile-interface-spec): Add awareness and checking of version
information.
* doc/ref/api-modules.texi (R6RS Version References): New subsubsection.
(General Information about Modules): Explain differences in search
process when version references are used.
(Using Guile Modules) (Creating Guile Modules): Document `#:version'
keyword.
* module/ice-9/boot-9.scm (module-export!, module-replace!)
(module-re-export!): Allow members of export list to be pairs, mapping
internal names to external ones.
* doc/ref/api-modules.texi (Creating Guile Modules): Update
documentation for `#:export', `#:export-syntax', `#:replace',
`#:re-export', `#:re-export-syntax', `export', and `re-export' to
reflect new format for arguments.
because it looks better in the DVI output. Exceptions are
- wide examples, which would cause overfull hboxes if they
used the bigger @lisp font
- very large examples, which may look too big at the @lisp size.
duplicated elsewhere); doc for with-traps and debug-object? moved
to section on evaluator trap options.
(High Level Traps): Renamed just `Traps'. Add references to
evaluator trap options and debug options. Make language
appropriate for core Guile (as opposed to previously separate
package).
(Location Traps): Corrected to reflect that location traps now
specify a specific position, not a range of positions.
(Debugging Examples): New (content moved here from
scheme-debugging.texi, and updated to use traps instead of
breakpoints).
* api-modules.texi (Included Guile Modules): Change `Debugging
Features' reference to `Tracing'.
* api-options.texi (Evaluator trap options): Doc for with-traps
and debug-object? is now here.
* guile.texi, scheme-debugging.texi: Move the `Tracing' content of
scheme-debugging.texi to the Modules section.
* scheme-using.texi (Using Guile in Emacs, GDS Getting Started):
Minor edits.
* scheme-debugging.texi (Debugging Features, Intro to
Breakpoints): Removed.
(Examples): Moved to api-debug.texi.
(Tracing, Old Tracing): Promoted one level.
(New Tracing, Tracing Compared): Removed.