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

1373 commits

Author SHA1 Message Date
Andy Wingo
7b0a2576c1 add docs for shift and reset
* doc/ref/api-control.texi (Prompt Primitives): Break call-with-prompt
  and abort-to-prompt out into a subsubsection.
  (Shift and Reset): New subsubsection.
2011-06-16 13:01:43 +02:00
Ludovic Courtès
e108c961fe doc: Mention the former name of `guild'.
* doc/ref/scheme-using.texi (Using Guile Tools): Add a footnote
  mentioning that `guild' used to be `guile-tools'.

* doc/ref/tools.texi (Executable Modules): Nitpicks.
2011-06-08 23:19:37 +02:00
Andy Wingo
715146aa15 add guild docs
* doc/ref/scheme-using.texi (Using Guile Tools): Add some optimistic
  guild docs.
2011-05-31 22:36:52 +02:00
Andy Wingo
b8b0659879 rename guile-tools' to guild'
* configure.ac: Look for ln -s.  Write out `guild' instead of
  `guile-tools'.

* meta/Makefile.am (install-data-hook): Link the installed `guild' to
  the backward-compatible `guile-tools' name.
  (bin_SCRIPTS, EXTRA_DIST): Fix up for guild change.

* meta/guild.in: Moved here from `guile-tools.in'.

* doc/ref/Makefile.am (autoconf-macros.texi):
* doc/ref/api-evaluation.texi (Compilation):
* doc/ref/autoconf.texi (Autofrisk, Using Autofrisk):
* doc/ref/mod-getopt-long.texi (getopt-long Reference):
* doc/ref/tools.texi (Miscellaneous Tools, Executable Modules): Minimal
  doc update.

* .gitignore:
* am/guilec (.scm.go):
* libguile/Makefile.am (snarf2checkedtexi):
* module/Makefile.am (ice-9/psyntax-pp.go): Update makefiles, etc.

* module/scripts/README:
* module/scripts/lint.scm:
* module/scripts/list.scm: Update commentaries.
2011-05-31 22:01:47 +02:00
Neil Jerram
c382f58943 Doc for getopt-long's new stop-at-first-non-option option
* doc/ref/mod-getopt-long.texi (getopt-long): Mention optional keyword
  parameters.

  (getopt-long Reference): Document #:stop-at-first-non-option.
2011-05-26 22:02:16 +01:00
Neil Jerram
7a582ca155 Remove unused script-getopt.texi
* doc/ref/Makefile.am (guile_TEXINFOS): Remove script-getopt.texi.

* doc/ref/script-getopt.texi: Deleted.  This file wasn't included in
  the manual, and its content is now duplicated identically in
  scheme-scripts.texi.
2011-05-26 21:30:05 +01:00
Mark H Weaver
f567a43cf0 Clarify docs for SCM_UNSPECIFIED: used sometimes but not always
* doc/ref/data-rep.texi (Immediate objects): Clarify the description
  of SCM_UNSPECIFIED.  It is returned by some (but not all) expressions
  whose value is unspecified by the Scheme standard.
2011-05-25 12:40:55 -04:00
Andy Wingo
1233b38393 fix documentation for option-set! syntaxen
* doc/ref/api-evaluation.texi (Scheme Read): Note that read-set! is
  syntax.
  (Scheme Write): Likewise for print-set!.

* doc/ref/api-io.texi (Writing): Remove reference to
  print-options-interface.

* doc/ref/repl-modules.texi (Readline Options): Update, and add entries
  for readline-options, readline-set! et al.
2011-05-20 11:54:46 +02:00
Ludovic Courtès
19301dc56d Add `vhash-fold-right'.
* module/ice-9/vlist.scm (vhash-fold-right): New procedure.

* test-suite/tests/vlist.test ("vhash")["vhash-fold-right"]: New test.

* doc/ref/api-compound.texi (VHashes): Document `vhash-fold-right'.
2011-05-08 18:20:42 +02:00
Andreas Rottmann
2252321bb7 Make the R6RS simple I/O library use conditions
* module/rnrs/io/ports.scm (display): Implement as an
  exception-converting wrapper around Guile's core display.
* module/rnrs/io/simple.scm: Don't export Guile's corresponding core
  procedures, but use `(rnrs io ports)' instead.  This way, we get the
  conditions required by R6RS raised.

* doc/ref/r6rs.texi (rnrs io simple): Mention that these procedures are
  supposed to raise R6RS conditions.
2011-05-07 23:48:46 +02:00
Andreas Rottmann
040dfa6f37 More completely document the `(rnrs io ports)' library
* doc/ref/api-io.texi (R6RS I/O Ports): Transcribe missing parts from
  the R6RS document.
2011-05-07 22:30:40 +02:00
Andy Wingo
800690141f fix break example
* doc/ref/api-control.texi (while do): Fix a break example.
2011-04-28 21:33:12 +02:00
Andy Wingo
91956a94fe allow while as an expression
* module/ice-9/boot-9.scm (while): Specify the return value as #f under
  normal conditions, #t under (break), and arg... under (break arg...).
* test-suite/tests/syntax.test ("while"): Test.
* doc/ref/api-control.texi (while do): Document.
2011-04-28 15:48:35 +02:00
Ludovic Courtès
de424d9594 Document `(ice-9 binary-ports)'.
* doc/ref/api-io.texi (R6RS I/O Ports): Mention `(ice-9 binary-ports)'.

* NEWS: Update.
2011-04-27 22:14:31 +02:00
Ludovic Courtès
96128014bf Make sure binary ports pass `binary-port?' regardless of the locale.
* libguile/r6rs-ports.c (make_bip, make_cbip, make_bop, make_cbop):
  Set `c_port->encoding' to NULL.

* test-suite/tests/r6rs-ports.test ("7.2.7 Input
  Ports")["bytevector-input-port is binary"]: New test.
  ("7.2.7 Input Ports")["make-custom-binary-input-port"]: Make sure PORT
  passes `binary-port?' and `input-port?'.
  ("8.2.10 Output ports")["bytevector-output-port is binary"]: New test.
  ["make-custom-binary-output"]: Rename to...
  ["make-custom-binary-output-port"]: ... this.

* test-suite/tests/ports.test ("string ports")["read-char, wrong
  encoding, error", "read-char, wrong encoding, escape", "read-char,
  wrong encoding, substitute", "peek-char, wrong encoding, error"]: Use
  `set-port-encoding!' instead of `%default-port-encoding' to set the
  encoding of bytevector input ports.

* test-suite/tests/rdelim.test ("read-line")["decoding error", "decoding
  error, substitute"]: Likewise.

* doc/ref/api-io.texi (R6RS Port Manipulation): Document `binary-port?'
  and `textual-port?'.

* doc/ref/r6rs.texi (R6RS Incompatibilities): Mention the soft
  distinction between textual and binary ports.
2011-04-22 23:58:00 +02:00
Mark H Weaver
c3d8450c75 Clarify units of string length in decription of scm_from_stringn
* doc/ref/api-data.texi (Conversion to/from C): In description of
  scm_from_stringn, clarify that the length is specified in bytes.
2011-04-21 09:56:11 -04:00
Mark H Weaver
68a78738a4 Clarify the units of returned lengths in string conversion functions
* doc/ref/api-data.texi (Conversion to/from C): In descriptions of
  scm_to_stringn and scm_to_{latin1,utf8,utf32}, clarify that the
  returned length is in units of bytes or code points, not characters.
  Also change NULL to @code{NULL} in a few places.
2011-04-19 23:59:17 -04:00
Andy Wingo
1e56cff233 add --fresh-auto-compile
* doc/ref/api-evaluation.texi (Compilation): Add discussion of
  --fresh-auto-compile.
* doc/ref/scheme-scripts.texi (Invoking Guile): Add --fresh-auto-compile
  option.

* NEWS: Add entry.

* libguile/load.c: Define %fresh-auto-compile.
  (scm_primitive_load_path): Use it here.
  (scm_init_load_should_auto_compile): Init from GUILE_AUTO_COMPILE env
  var, with a value of "fresh".

* module/ice-9/boot-9.scm (load-in-vicinity): Auto-compilation cache is
  stale if %fresh-auto-compile is true.

* module/ice-9/command-line.scm (compile-shell-switches): Parse out
  --fresh-auto-compile.
2011-04-15 11:27:27 +02:00
Mark H Weaver
882c89636a Fix the R6RS exact-integer-sqrt and import into core guile
* libguile/numbers.c (scm_exact_integer_sqrt): New C procedure to
  compute exact integer square root and remainder.
  (scm_i_exact_integer_sqrt): New Scheme procedure `exact-integer-sqrt'
  from the R6RS, imported into core guile.

* libguile/numbers.h: Add prototypes.

* module/rnrs/base.scm: Remove broken stub implementation, which would
  fail badly when applied to large integers.

* doc/ref/api-data.texi: Add documentation.

* doc/ref/r6rs.texi: Change documentation for `exact-integer-sqrt' to a
  stub that xrefs the core docs, as is done for other operations
  available in core.

* test-suite/tests/numbers.test: Add tests.

* NEWS: Add news entries.
2011-04-09 16:11:49 -04:00
Andreas Rottmann
165b10ddfa Move `define-inlinable' into the default namespace
* module/ice-9/boot-9.scm (define-inlineable): Moved here from SRFI-9.
* module/srfi/srfi-9 (define-inlinable): Removed here.

* doc/ref/api-procedures.texi (Inlinable Procedures): Add subsection
  about `define-inlinable'.
2011-04-07 01:12:26 +02:00
Mark H Weaver
ce6066065d Doc fix: quotient/remainder/modulo do not require exact arguments
* doc/ref/api-data.texi (Arithmetic): `floor-remainder' is equivalent to
  the R5RS `modulo' when the arguments are integers.  Previously,
  equivalence was claimed only for exact integers.  Similarly for
  `truncate-quotient' and `truncate-remainder' compared with the R5RS
  `quotient' and `remainder'.
2011-04-06 13:00:34 -04:00
Andy Wingo
c6b08d2194 string->pointer and pointer->string have optional encoding arg
* test-suite/tests/foreign.test ("pointer<->string"): Add test cases.

* libguile/foreign.c (scm_string_to_pointer, scm_pointer_to_string): Add
  optional encoding, and in the pointer->string case, length arguments.

* libguile/foreign.h: Update prototypes of internal functions.
  Shouldn't affect ABI as they are internal.

* doc/ref/api-foreign.texi (Void Pointers and Byte Access): Update
  docs.
2011-04-01 13:31:26 +02:00
Andy Wingo
09b7459b49 web.texi: handler return types documentation
* doc/ref/web.texi (Web Server): More docs on handler return types.
2011-03-31 16:36:01 +02:00
Andy Wingo
2ebdf6b555 web.texi: fix uri->string invocation
* doc/ref/web.texi (Web Examples): Fix uri->string invocation.  Thanks
  to Romel Sandoval for the report.
2011-03-31 16:17:35 +02:00
Andy Wingo
2460274d36 document -q, repl options
* doc/ref/scheme-scripts.texi (Invoking Guile): Document -q.
* doc/ref/scheme-using.texi (Init File): New section, on .guile.
  (Readline): Link to Init File.
  (System Commands): Document the various REPL options, and
  repl-default-option-set!.
2011-03-29 12:18:20 +02:00
Noah Lavine
8e9af85412 Document SRFI-23
* doc/ref/srfi-modules.texi: mention that we support SRFI 23
 * module/ice-9/boot-9.scm (%cond-expand-features): add srfi-23
2011-03-27 13:02:15 +02:00
Neil Jerram
c6e05396dc Remove statements about scripts/* that are no longer true
* doc/ref/tools.texi (Executable Modules): Say "guile-tools modules"
  instead of "executable modules".  Remove obsolete statements about
  not ending in .scm, being executable, and beginning with shell
  script invocation sequence.

* module/scripts/README: Ditto.
2011-03-25 19:45:14 +00:00
Neil Jerram
6b8bc6f8b5 Inline the effect of am/pre-inst-guile
It's just one variable definition, and in my opinion it confuses,
rather than helps, the overall build picture to have two names
(preinstguile and meta/guile) for the same thing.

* am/Makefile.am (am_frags): Remove pre-inst-guile.

* am/pre-inst-guile: Deleted.

* doc/ref/Makefile.am: Don't include am/pre-inst-guile.
  ($(snarf_doc).am, $(snarf_doc).texi): Expand $(preinstguile).

* module/Makefile.am (ice-9/psyntax-pp.scm.gen): Don't include
  am/pre-inst-guile.
  (ice-9/psyntax-pp.scm.gen): Expand $(preinstguile).
2011-03-25 19:45:14 +00:00
Andy Wingo
95f5e303bc scm_{to,from}_locale_string use current locale, not current ports
* libguile/strings.c (scm_to_locale_stringn, scm_from_locale_stringn):
  Use the encoding of the current locale, not of the current i/o ports.
  Also use the current conversion strategy.

* doc/ref/api-data.texi (Conversion to/from C): Update docs.
2011-03-17 18:29:08 +01:00
Andy Wingo
148c331769 add pointer->scm, scm->pointer
* libguile/foreign.c (scm_pointer_to_scm, scm_scm_to_pointer): New
  functions, useful to pass and receive SCM values to and from foreign
  functions.

* module/system/foreign.scm: Export the new functions.

* doc/ref/api-foreign.texi (Foreign Variables): Add docs.

* test-suite/tests/foreign.test ("pointer<->scm"): Tests.
2011-03-17 10:39:02 +01:00
Ludovic Courtès
958173e489 doc: Remove "lack of support for Unicode I/O and strings".
* doc/ref/api-io.texi (R6RS I/O Ports): Remove 1.8ish comment.
2011-03-13 23:21:07 +01:00
Andreas Rottmann
531c9f1dc5 Don't mix definitions and expressions in SRFI-9
The expansion of `define-inlinable' contained an expression, which made
SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition
used in expression context").

* module/srfi/srfi-9.scm (define-inlinable): Get rid of apparently
  useless expression in the expansion, so the expansion yields only
  definitions.  At the same time, use a space in the generated names to
  lessen the chances of name conflicts, also avoiding -Wunused-toplevel
  warnings.
* test-suite/tests/srfi-9.test (non-toplevel): New test verifying that
  `define-record-type' works in non-toplevel context as well.
* doc/ref/srfi-modules.texi (SRFI-9 - define-record-type): Add
  subsubsection noting that Guile does not enforce top-levelness.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2011-03-09 21:36:54 +01:00
Mark H Weaver
c428e58681 Add scm_from_latin1_keyword and scm_from_utf8_keyword
* libguile/keywords.c (scm_from_latin1_keyword, scm_from_utf8_keyword):
  New functions appropriate for use when keyword name is a constant.

  (scm_from_locale_keyword, scm_from_locale_keywordn): Change formal
  parameter from `str' to `name'.

* libguile/keywords.h: Add prototypes for new functions.  Change formal
  parameter of scm_from_locale_keyword* from `str' to `name'.

* doc/ref/api-data.texi: Document new functions.  Remind users that
  scm_from_locale_keyword should not be used when the name is a C string
  constant.  Change formal parameter from `str' to `name'.
2011-03-09 01:14:43 -05:00
Mark H Weaver
ce3ce21c62 Improve docs of string and symbol conversions from C strings
* doc/ref/api-data.texi (Conversion to/from C): Document
  scm_from_latin1_string, scm_from_utf8_string, and
  scm_from_utf32_string.  Remind readers that these functions should be
  used to convert C string constants, and that scm_from_locale_string is
  _not_ appropriate for that purpose.

  (Symbol Primitives): Document scm_from_latin1_symbol and
  scm_from_utf8_symbol.  Remind readers that these functions should be
  used when the specified names are C string constants, and that
  scm_from_locale_symbol is _not_ appropriate for that purpose.
2011-03-08 18:24:54 -05:00
Mark H Weaver
e3c15cf7a6 Remove incorrect footnote from GOOPS manual
* doc/ref/goops.texi (Inheritance): Remove footnote which incorrectly
  stated that <complex> was not shown in the class hierarchy figure.
2011-03-08 17:51:17 -05:00
Mark H Weaver
4f1bbedb6d Fix description of the R6RS `finite?' in manual
* doc/ref/r6rs.texi (rnrs base): `(finite? x)' returns true iff x is
  neither infinite nor a NaN.  Previously, it stated that `finite?' was
  the negation of `infinite?', which was incorrect because NaNs are
  neither finite nor infinite.  Combine description of 'nan?' with those
  of `finite?' and `infinite?'.
2011-03-08 17:50:57 -05: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
Andy Wingo
c2e56d9b07 eval-string docs
* doc/ref/api-evaluation.texi (Fly Evaluation): Update eval-string
  documentation.
2011-03-08 21:53:02 +01:00
Andy Wingo
13459a9619 document scm_call_{5,6,n}
* doc/ref/api-evaluation.texi (Fly Evaluation): Document
  scm_call_{5,6,n}.
2011-03-08 21:06:12 +01:00
Michael Gran
47b86dbf4d Add ,width meta-command to set screen width in debug output
This meta-command allows one to set the default number of columns
that output from ,backtrace and ,locals shall occupy.

* doc/ref/scheme-using.texi (Debug Commands): document ,width
* module/system/repl/command.scm (*width*): new var
  (backtrace, locals): use *width* in optarg
  (width): new meta-command
2011-03-04 11:01:48 +01:00
Ludovic Courtès
fba502dbcc Improve the documentation for `dynamic-link'.
* doc/ref/api-foreign.texi (Foreign Libraries): Make it clear that the
  LIBRARY argument of `dynamic-link' should not contain an extension.
  (Foreign Functions): Add cross-reference from `load-extension' to
  `dynamic-link'.  Typeset file names and module names correctly.
2011-03-02 22:12:56 +01:00
Andy Wingo
ac012a27a2 update port-filename docs
* doc/ref/api-io.texi (File Ports):
* libguile/ports.c (scm_port_filename): Fix docs to match
  implementation.
2011-02-28 20:54:03 +01:00
Andy Wingo
450aee6790 update R6RS incompatibilities
* doc/ref/r6rs.texi (R6RS Incompatibilities): Update.
2011-02-27 13:07:04 +01:00
Ludovic Courtès
080a9d4f56 Revert ""latin1" -> "Latin-1"."
This reverts commit c2c550ca9d.

The name "latin1" is standardized by IANA, unlike the other one.
Reported by Bruno Haible.
2011-02-24 23:17:23 +01:00
Andy Wingo
0e8a11c49a update examples in manual to use PKG_CHECK_MODULES
* doc/ref/autoconf.texi (Using Autoconf Macros): Switch example to use
  PKG_CHECK_MODULES.
* doc/ref/libguile-linking.texi (A Sample Guile Main Program): Likewise,
  and change from configure.in to configure.ac, and recommend
  autoreconf.
2011-02-20 22:08:27 +01:00
Andy Wingo
097a793b22 pkg-config instead of guile-config in manuals
* doc/ref/api-options.texi (Build Config):
* doc/ref/libguile-linking.texi (Linking Programs With Guile):
  (A Sample Guile Main Program):
* doc/ref/libguile-smobs.texi (The Complete Example): Use pkg-config in
  the examples instead of guile-config.
2011-02-20 21:43:19 +01:00
Andy Wingo
f244cc5154 tour.texi compilation fix
* doc/ref/tour.texi (Writing Guile Extensions): Fix compilation
  example.
2011-02-20 15:01:37 +01:00
Andy Wingo
4b93693dff @value{EFFECTIVE-VERSION} instead of 2.0 in some places in the manual
* doc/ref/history.texi (A Timeline of Selected Guile Releases): Update
  the 2.0 release blurb.

* doc/ref/api-foreign.texi (Modules and Extensions):
* doc/ref/libguile-extensions.texi (A Sample Guile Extension):
* doc/ref/tour.texi (Linking Guile into Programs): Use
  @value{EFFECTIVE-VERSION} instead of 2.0.  Also fix sample extension
  compilation line to include the Guile CFLAGS.
2011-02-20 13:16:37 +01:00
Neil Jerram
5ec48b7045 Fix typos in (web ...) doc
* doc/ref/web.texi (Types and the Web): "help" -> "helpful".
  (HTTP): Add closing paren.  Remove code that looks like a leftover.
2011-02-18 23:11:49 +00:00
Neil Jerram
e888334c27 Last (for a little while) GOOPs doc fix
* doc/ref/goops.texi (GOOPS Object Miscellany): Clarify that it would
  be instances being printed, not classes.
2011-02-18 23:10:54 +00:00