1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

55 commits

Author SHA1 Message Date
Andy Wingo
31cb10af81 Letrectify only on -O2; update docs
* 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.
2019-08-25 12:51:03 +02:00
Andy Wingo
356ea09719 Add notion of declarative modules
* 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.
2019-08-18 22:27:12 +02:00
Alex Kost
e7cde8be9e Fix typo in manual.
* doc/ref/api-modules.texi (Using Guile Modules): Remove extra "yet".
2016-05-22 19:29:17 +02:00
Mark H Weaver
b1451ad859 docs: Fix documented return type of 'scm_c_export'.
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.
2014-10-01 19:13:34 -04:00
Mark H Weaver
0fce815b1b Document #:prefix option in use-module clauses.
* doc/ref/api-modules.texi (Using Guile Modules): Document #:prefix
  option.
2014-09-20 05:46:45 -04:00
Taylan Ulrich B
43191a31a5 R6RS library documentation fix
* doc/ref/api-modules.texi (R6RS Libraries): Move 'export' before
  'import' in the example library form, as required by R6RS.
2014-06-06 16:38:09 -04:00
Mark H Weaver
254d313a21 Remove outdated and misplaced "Included Guile Modules" node from manual.
* doc/ref/api-modules.texi (Included Guile Modules): Remove.
  (Using Guile Modules): Fix cross reference.
2013-04-07 15:45:38 -04:00
Mark H Weaver
71539c1cd3 Cross reference 'SRFI-9 Records' directly instead of 'SRFI-9'.
* doc/ref/api-compound.texi (Record Overview, Records):
  doc/ref/api-modules.texi (Included Guile Modules):
  doc/ref/r6rs.texi (R6RS Records): Cross reference 'SRFI-9 Records'
  directly instead of 'SRFI-9'.
2013-04-04 03:21:40 -04:00
Jason Earl
a4b4fbbdaa excise use of "iff" in the manual
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/compiler.texi:
* doc/ref/intro.texi:
* doc/ref/scheme-using.texi:
* doc/ref/sxml.texi:
* doc/ref/web.texi: Change uses of "iff" to "if, otherwise".  Fixes bug
  10302.
2013-03-10 22:29:18 +01:00
Mark H Weaver
f57ea23ac8 Fix thread-unsafe lazy initializations.
* 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.
2013-03-05 16:04:55 -05:00
Bake Timmons
994d87be35 Improve keyword notation of Texinfo function definitions.
* 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.
2013-03-02 20:34:29 +01:00
Andy Wingo
62e15979b5 deprecate scm_sym2var
* 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.
2012-05-23 11:49:16 +02:00
Bake Timmons
df0a100250 Make notation for Scheme repeated arguments more consistent in manual.
* doc/ref/api-compound.texi
* doc/ref/api-control.texi
* doc/ref/api-data.texi
* doc/ref/api-debug.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-macros.texi
* doc/ref/api-memory.texi
* doc/ref/api-modules.texi
* doc/ref/api-procedures.texi
* doc/ref/api-regex.texi
* doc/ref/api-scheduling.texi
* doc/ref/api-utility.texi
* doc/ref/goops.texi
* doc/ref/match.texi
* doc/ref/misc-modules.texi
* doc/ref/posix.texi
* doc/ref/r6rs.texi
* doc/ref/scheme-using.texi
* doc/ref/srfi-modules.texi
* doc/ref/sxml-match.texi: Make notation for Scheme repeated arguments more
  consistent in manual.
2012-02-04 00:10:13 +01:00
Bake Timmons
64de6db5c6 Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
  more consistent.
2012-02-02 12:04:16 +01:00
Andy Wingo
0740cb49d1 more documentation on the process of loading source and compiled files
* doc/ref/api-evaluation.texi (Load Paths): Move documentation of
  %load-path and related procedures here, from Build Config.  Add docs
  for %load-compiled-path.

* doc/ref/api-foreign.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-options.texi:
* doc/ref/scheme-using.texi: Update xrefs.
2012-01-27 16:33:11 +01:00
Andy Wingo
925172cf52 add current-filename, add-to-path, add-to-load-path
* module/ice-9/boot-9.scm (current-filename, add-to-path)
  (add-to-load-path): New syntaxen.

* doc/ref/api-evaluation.texi (Loading): Move load-path related
  procedures to a new section:
  (Load Paths): Hither.  Document add-to-path and add-to-load-path.

* doc/ref/api-debug.texi (Source Properties): Document
  current-source-location and current-filename.

* doc/ref/api-modules.texi:
* doc/ref/guile-invoke.texi:
* doc/ref/scheme-using.texi: Update @ref for Load Paths change.
2012-01-21 00:08:17 +01:00
Andy Wingo
992a387958 update api-modules.texi
* 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.
2012-01-07 00:45:44 +01:00
Ludovic Courtès
7af1ba2f6c doc: Fix typesetting of function definitions in "Accessing Modules from C".
* 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.
2011-09-27 13:41:21 +02:00
Andy Wingo
831e6782bf scm_public_ref et al docs
* doc/ref/api-modules.texi (Accessing Modules from C): Add docs for the
  new C procedures.
2011-03-08 22:34:53 +01:00
Neil Jerram
c8eb279799 Typo fix
* doc/ref/api-modules.texi (R6RS Libraries): "libraries
  implementation" -> "library implementation".
2011-02-13 22:34:12 +00:00
Andy Wingo
cdab9fc625 add ,reload meta-command and document it and reload-module
* module/ice-9/boot-9.scm (reload-module): Add docstring.
* module/system/repl/command.scm (reload): New meta-command.

* doc/ref/scheme-using.texi (Module Commands): Document the ,reload
  meta-command.
* doc/ref/api-modules.texi (Module System Reflection): Document
  reload-module.
2010-12-17 13:27:43 +01:00
Andy Wingo
626e36e5cb document variable-unset!
* doc/ref/api-modules.texi (Variables): Document variable-unset!.

* NEWS: Update.
2010-12-17 13:16:36 +01:00
Andy Wingo
6e069bbfce update traps documentation (unfinished)
* 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.
2010-10-07 13:06:57 +02:00
Andy Wingo
d68a81e038 recommend #:replace
* doc/ref/api-modules.texi (Creating Guile Modules): Update text to
  recommend #:replace.
* module/srfi/srfi-19.scm (current-time): #:replace.
2010-07-17 13:31:06 +02:00
Julian Graham
43d6eb75f3 Edits for R6RS library implementation documentation, as suggested by
Ludovic Courtès.

* doc/ref/api-module.texi (R6RS Libraries): Wrap keywords variously in
  @code and @dfn forms; rewrite pointer to implicit phasing paper; add
  "Scheme Syntax" specification to @deffns.
2010-05-22 18:20:00 -04:00
Julian Graham
71194485d6 Documentation for the R6RS library' and import' forms.
* doc/ref/api-modules.texi (R6RS Libraries): New section, documents
  `library' and `import'.
2010-05-20 19:20:39 -04:00
Neil Jerram
26b9f90900 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.)
2010-04-10 13:32:42 +01:00
Andy Wingo
726b8ba3fd 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.
2010-04-02 00:23:24 +02:00
Ludovic Courtès
d12f974b43 Change `dynamic-link' to return a global handle when the argument is omitted.
* libguile/dynl.c (sysdep_dynl_link): Handle FNAME == NULL.
  (scm_dynamic_link): Make argument optional.  Adjust body accordingly.

* test-suite/standalone/test-ffi (global, strerror, strlen): New
  bindings.
  Add test for these bindings.

* doc/ref/api-modules.texi (Low level dynamic linking): Update
  description of `dynamic-link'.
2010-03-17 00:54:01 +01:00
Julian Graham
dca14012bd Complete support for version information in Guile's `module' form.
* 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.
2009-12-22 20:34:55 +01:00
Julian Graham
78c22f5edc Support for renaming bindings on module export.
* 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.
2009-12-22 20:34:50 +01:00
Andy Wingo
700908288c remove "module system quirks" from the manual
* doc/ref/api-modules.texi (Module System Quirks): Remove this outdated
  section.
2009-12-21 11:54:48 +01:00
Neil Jerram
2a7758fe23 Remove page breaks except before new chapters and indices
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
  doc/ref/api-control.texi, doc/ref/api-data.texi,
  doc/ref/api-debug.texi, doc/ref/api-evaluation.texi,
  doc/ref/api-i18n.texi, doc/ref/api-io.texi, doc/ref/api-memory.texi,
  doc/ref/api-modules.texi, doc/ref/api-options.texi,
  doc/ref/api-overview.texi, doc/ref/api-procedures.texi,
  doc/ref/api-scheduling.texi, doc/ref/api-smobs.texi,
  doc/ref/api-translation.texi, doc/ref/api-utility.texi,
  doc/ref/expect.texi, doc/ref/libguile-concepts.texi,
  doc/ref/libguile-program.texi, doc/ref/misc-modules.texi,
  doc/ref/repl-modules.texi, doc/ref/scheme-debugging.texi,
  doc/ref/scheme-reading.texi, doc/ref/scheme-scripts.texi,
  doc/ref/script-getopt.texi, doc/ref/scsh.texi,
  doc/ref/srfi-modules.texi: Remove @page before @section.
2009-12-19 00:58:54 +00:00
Neil Jerram
cdc4f3db09 Fix doc of let*-values
Thanks to Judy Hawkins for reporting this.

* doc/ref/api-modules.texi (Included Guile Modules): Change
  `let-values*' to `let*-values'.
2009-08-27 22:29:09 +01:00
Neil Jerram
8d9cb14e61 Use #:keyword syntax in preference to :keyword
because that is Guile's default.
2009-08-09 15:05:02 +01:00
Neil Jerram
aba0dff5f7 In general, use @lisp in preference to @smalllisp
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.
2009-08-09 15:04:08 +01:00
Ludovic Courtès
c8779dde04 Fix doc typo regarding `use-syntax' and "syntax transformers". 2008-06-28 20:37:21 +02:00
Neil Jerram
24dbb5ed10 * api-debug.texi (Low Level Trap Calls): Removed (material
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.
2008-03-19 22:51:24 +00:00
Ludovic Courtès
b1f57ea4ce Changes from arch/CVS synchronization 2007-07-10 22:34:50 +00:00
Neil Jerram
9f1ba6a9a4 Doc typo fixes 2006-09-15 09:23:18 +00:00
Kevin Ryde
1b09b607dd merge from 1.8 branch 2006-04-16 23:18:55 +00:00
Kevin Ryde
6459d139d5 wrong @subsection in my last 2006-02-04 00:27:20 +00:00
Kevin Ryde
ef5f91637b (Compiled Code Installation): New section. 2006-02-04 00:24:37 +00:00
Marius Vollmer
e724644d45 Added more words to #:replace from Ludovic. Thanks! 2005-12-07 00:31:49 +00:00
Kevin Ryde
46bb559d6c From Ludovic Courtès, partial rework by me:
* doc/ref/api-modules.texi (Creating Guile Modules): In define-module,
describe #:re-export, #:export-syntax, #:re-export-syntax, #:replace
and #:duplicates.  Add re-export.
2005-11-05 21:38:49 +00:00
Kevin Ryde
5c132e68d0 @code for %load-path 2005-01-14 23:23:08 +00:00
Kevin Ryde
a236df75ae Grammatical typo. 2005-01-09 23:15:04 +00:00
Kevin Ryde
aca55ba9b0 Move ice-9 threads to alphabetical order. 2005-01-08 00:15:57 +00:00
Kevin Ryde
54a3c9929c (Included Guile Modules): Add expect, format, ftw,
getopt-long, history, popen, pretty-print, q, readline, receive, regex,
streams, syncase.
2005-01-08 00:15:10 +00:00
Kevin Ryde
6cb787b801 (Included Guile Modules): Remove ice-9 jacal, no such module. 2005-01-07 23:59:30 +00:00