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

48 commits

Author SHA1 Message Date
Morgan Smith
f27e8b855f
Fix typos throughout codebase.
* NEWS:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-deprecated.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-foreign.texi:
* doc/ref/api-i18n.texi:
* doc/ref/api-io.texi:
* doc/ref/api-languages.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-memory.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-options.texi:
* doc/ref/api-peg.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/expect.texi:
* doc/ref/goops.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/repl-modules.texi:
* doc/ref/scheme-ideas.texi:
* doc/ref/scheme-scripts.texi:
* doc/ref/srfi-modules.texi:
* gc-benchmarks/larceny/dynamic.sch:
* gc-benchmarks/larceny/twobit-input-long.sch:
* gc-benchmarks/larceny/twobit.sch:
* libguile/gc.h:
* libguile/ioext.c:
* libguile/list.c:
* libguile/options.c:
* libguile/posix.c:
* libguile/threads.c:
* module/ice-9/boot-9.scm:
* module/ice-9/optargs.scm:
* module/ice-9/ports.scm:
* module/ice-9/pretty-print.scm:
* module/ice-9/psyntax.scm:
* module/language/elisp/parser.scm:
* module/language/tree-il/compile-bytecode.scm:
* module/srfi/srfi-37.scm:
* module/srfi/srfi-43.scm:
* module/statprof.scm:
* module/texinfo/reflection.scm:
* test-suite/tests/eval.test:
* test-suite/tests/fluids.test:
Fix typos.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-06 11:51:53 +02:00
Ekaitz Zarraga
1e3b5390e3 Fix example in syntax-rules doc
* doc/ref/api-macros.texi (Macros): Fix doc1 macro example

Fixes debbugs.gnu.org/65132.
2023-09-28 12:11:10 +02:00
Bruno Victal
99e644dbc7
doc: Use archived URL from Internet Archive for syntax-rules primer.
* doc/ref/api-macros.texi (Syntax Rules): Use archived URL from
Internet Archive for syntax-rules primer.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-16 22:34:01 +02:00
Morgan Smith
c7d170c5d1
Fix typos throughout codebase.
* NEWS:
* README:
* doc/r5rs/r5rs.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/libguile-concepts.texi:
* doc/ref/posix.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* examples/box-dynamic-module/box.c:
* examples/box-dynamic/box.c:
* examples/box-module/box.c:
* examples/box/box.c:
* examples/safe/safe:
* examples/scripts/README:
* examples/scripts/hello:
* gc-benchmarks/larceny/twobit-input-long.sch:
* gc-benchmarks/larceny/twobit-smaller.sch:
* gc-benchmarks/larceny/twobit.sch:
* libguile/expand.c:
* libguile/load.c:
* libguile/net_db.c:
* libguile/scmsigs.c:
* libguile/srfi-14.c:
* libguile/threads.c:
* meta/guile.m4:
* module/ice-9/match.upstream.scm:
* module/ice-9/ports.scm:
* module/language/cps/graphs.scm:
* module/scripts/doc-snarf.scm:
* module/srfi/srfi-19.scm:
* module/system/repl/command.scm:
* test-suite/tests/srfi-18.test:
Fix typos.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-16 22:09:01 +02:00
Jean Abou Samra
7d5ab8fa40 doc: Fix eval-when example
* doc/ref/api-macros.texi: make the macro expand to the literal
  date, not to a call to the date function.  The example previously
  did not actually need eval-when and did not show the intended
  effect.
2023-01-17 07:06:55 +01:00
Andy Wingo
5046385df8 Document syntax-sourcev
* NEWS: Add doc link.
* doc/ref/api-macros.texi (Syntax Transformer Helpers): Document
syntax-sourcev.
* module/system/syntax.scm: Re-export syntax-sourcev.
2021-03-09 20:50:08 +01:00
Andy Wingo
c97e1fbb53 Document quote-syntax
* NEWS: Update.
* doc/ref/api-macros.texi (Syntax Case): Update.
2021-03-09 20:49:46 +01:00
Andy Wingo
579870abbc Update documentation to incorporate read-syntax
* NEWS: Update a bit.
* doc/ref/api-debug.texi (Source Properties): Mention read-syntax.
* doc/ref/api-evaluation.texi (Annotated Scheme Read): New section.
* doc/ref/api-macros.texi (Syntax Case): Update for source vectors.
2021-03-04 21:42:22 +01:00
Andy Wingo
a04a024f20 Implement read-syntax
* doc/ref/api-macros.texi (Syntax Case): Update documentation for
  datum->syntax.
* module/ice-9/psyntax.scm (datum->syntax): Use #:source keyword for
  source location info instead of an optional, and allow an alist.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/read.scm (%read, read): Refactor to allow read and
  read-syntax to share an implementation.
  (read-syntax): New function.
2021-02-21 22:09:41 +01:00
Andy Wingo
1bba859000 Document datum->syntax extensions
* doc/ref/api-macros.texi (Syntax Case): Document that template-id can
  be false, and document srcloc.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/psyntax.scm (syntax?): Allow the lexical context to be
  null.  Allow srcloc to be a source properties alist.  Inspired by
  Racket.
2021-02-21 11:35:12 +01:00
Andy Wingo
462782af86 Add documentation for else, =>, _, ... aux syntax
* doc/ref/api-macros.texi (Syntax Rules): Document aux syntax.
2019-09-19 15:42:57 +02:00
Mark H Weaver
313b1c4469 Fix a few typos in the manual.
Fixes <https://bugs.gnu.org/30276>.
Reported by Matt Wette <matt.wette@gmail.com>.

* doc/ref/api-macros.texi (Macro Expansion)
doc/ref/vm.texi (Procedure Call and Return Instructions): Fix typos.
2018-08-07 11:41:01 +02:00
Andy Wingo
1f560bc4b7 Remove support for legacy syntax objects.
* module/ice-9/psyntax.scm: Remove support for legacy syntax objects.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/deprecated.scm (allow-legacy-syntax-objects?): New
  deprecation.
* module/ice-9/boot-9.scm: Don't define allow-legacy-syntax-objects?.
* doc/ref/api-macros.texi: Remove documentation for
  allow-legacy-syntax-objects?.
2017-05-22 15:37:43 +02:00
Andy Wingo
ce934bcd43 Add allow-legacy-syntax-objects? parameter
* module/ice-9/psyntax.scm (syntax?): Only recognize legacy syntax
  objects if the new allow-legacy-syntax-objects? parameter is true.
* module/ice-9/boot-9.scm (allow-legacy-syntax-objects?): New
  parameter.
* doc/ref/api-macros.texi (Syntax Transformer Helpers): Document the
  horrible situation with legacy syntax objects.
* NEWS: Add entry.
2017-03-28 21:27:11 +02:00
Taylan Ulrich Bayırlı/Kammer
a04c849b09 Clarify datum->syntax documentation.
* doc/ref/api-macros.texi (Syntax Case): Make it clear that the first
  argument to datum->syntax must be an identifier.
2016-05-22 19:42:23 +02:00
Andy Wingo
a1aae2c3a0 Merge commit 'f6ddf827f8'
Conflicts:
	module/ice-9/boot-9.scm
	module/oop/goops.scm
2014-02-07 14:51:42 +01:00
Andy Wingo
03dfed840b Document top-level pseudo-hygiene
* doc/ref/api-macros.texi (Hygiene and the Top-Level): Add a section
  documenting our pseudo-hygienic top-level names.
2014-01-26 15:08:35 +01:00
Mark H Weaver
fc1cb3fad4 Improve docs for 'eval-when'.
* doc/ref/api-macros.texi (Eval When): Explain in detail what each
  condition means, including 'expand' which was previously undocumented.
  Change the example to use (expand load eval) and recommend that set of
  conditions, instead of (compile load eval) which was previously
  recommended and shown in the example.
2014-01-23 03:49:21 -05:00
Mark H Weaver
ba578eb044 Merge branch 'stable-2.0'
Conflicts:
	libguile/read.c
	test-suite/tests/web-response.test
2014-01-21 03:57:04 -05:00
Mark H Weaver
2d6a3144a1 Document that we support srfi-46 and add it to %cond-expand-features.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-46.

* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-46 to the list of core
  features.
  (SRFI-46): New node.

* doc/ref/api-macros.texi (Syntax Rules): Mention that the custom
  ellipsis identifier support is specified by SRFI-46.

* test-suite/tests/syntax.test ("syntax-rules"): Add ellipsis hygiene
  test from SRFI-46.
2014-01-15 03:21:07 -05:00
Mark H Weaver
b958141cdb Merge branch 'stable-2.0'
Conflicts:
	libguile/hash.c
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
	test-suite/tests/r6rs-ports.test
2014-01-14 01:30:56 -05:00
Mark H Weaver
0e18163366 Implement R7RS 'syntax-error'.
* module/ice-9/psyntax.scm (syntax-error): New macro.
  (syntax-rules): Handle 'syntax-error' templates specially
  for improved error reporting.

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-macros.texi (Syntax Rules): Add new subsection "Reporting
  Syntax Errors in Macros".

* test-suite/tests/syntax.test: Add tests.
2014-01-09 17:43:53 -05:00
Mark H Weaver
1624e149f7 psyntax: custom ellipses using 'with-ellipsis' or R7RS syntax-rules.
* module/ice-9/psyntax.scm (binding-type): Update the header comment
  to mention the new 'ellipsis' binding type.
  (macros-only-env): Preserve ellipsis bindings.
  (ellipsis?): Add 'r' and 'mod' as arguments.  Search the lexical
  environment for an ellipsis binding, and use it.
  (gen-syntax): Adapt to the additional arguments of 'ellipsis?'.
  (with-ellipsis): New core syntax.
  (convert-pattern): Add unary 'ellipsis?' procedure as an argument.
  (gen-clause): Adapt to the additional arguments of 'ellipsis?'.
  Pass unary 'ellipsis?' procedure to 'convert-pattern'.
  (syntax-case): Adapt to the additional arguments of 'ellipsis?'.
  (syntax-local-binding): Support new 'ellipsis' binding type.
  (syntax-rules): Add support for a custom ellipsis identifier as
  the first operand, as per R7RS.  Collect common code within new
  local procedure 'expand-syntax-rules'.

* module/ice-9/psyntax-pp.scm: Regenerate.

* module/ice-9/local-eval.scm (analyze-identifiers): Add support for
  'ellipsis' binding type.

* doc/ref/api-macros.texi (Syntax Rules): Add docs for R7RS custom
  ellipsis syntax.  Use @dots{}.
  (Syntax Case): Add docs for 'with-ellipsis'.  Use @dots{}.
  (Syntax Transformer Helpers): Update to include new 'ellipsis'
  binding type.

* test-suite/tests/syntax.test: Add tests.
2014-01-09 17:41:19 -05:00
Andy Wingo
660f2775e9 Fix cross-references in api-macros.texi
* doc/ref/api-macros.texi (Macro Expansion): Fix cross-references.
2013-12-10 19:49:56 +01:00
Andy Wingo
67915ab079 Doc updates to macroexpansion, compiled procs, and compiler.texi
* doc/ref/api-macros.texi (Macro Expansion): New section.
* doc/ref/api-procedures.texi (Compiled Procedures): Beginnings of a
  revision.  Not finished.
* doc/ref/compiler.texi (Compiling to the Virtual Machine): Beginnings
  of a revision.  CPS and bytecode are not done yet.
2013-12-04 20:46:02 +01:00
Mark H Weaver
28d5d2537c Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/keywords.c
	libguile/vm.c
2013-07-16 01:33:27 -04:00
Mark H Weaver
e006d87ba5 Manual: fix 'my-or' examples to use let-bound variable.
Fixes <http://bugs.gnu.org/14203> reported by Nikita Karetnikov.

* doc/ref/api-macros.texi (Defining Macros, Syntax Rules): Fix
  definition of 'my-or' example macro to use the let-bound variable.
2013-04-14 13:38:28 -04:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Andy Wingo
912f5f3445 fix doc build
* doc/ref/api-data.texi (Bitwise Operations): Don't use @-commands in
  @math.  Fixes doc build.
* doc/ref/api-macros.texi (Syntax Rules): Fix example result.
2013-03-15 19:22:18 +01:00
Andy Wingo
8ae26afefe add #:resolve-syntax-parameters? kwarg to syntax-local-binding
* doc/ref/api-macros.texi (Syntax Transformer Helpers): Document.

* module/ice-9/psyntax.scm (syntax-local-binding): Add
  #:resolve-syntax-parameters? kwarg.  Fixes bug 10991.
* module/ice-9/psyntax-pp.scm: Regenerate.

* test-suite/tests/syncase.test ("syntax-local-binding"): Add test.
2013-03-13 11:43:35 +01: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
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
Andy Wingo
68fcf71189 new syntax procedures to (system syntax)
* module/ice-9/boot-9.scm:
* module/ice-9/psyntax.scm (syntax-module, syntax-local-binding)
  (syntax-locally-bound-identifiers): After boot, move these definitions
  to a new (system syntax) module.

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-macros.texi: Add some words about syntax-module and
  friends being in (system syntax).
2012-01-25 21:31:20 +01:00
Andy Wingo
1ace4fbf3d add syntax-module
* module/ice-9/psyntax.scm (syntax-module): New accessor for syntax
  objects.
* module/ice-9/psyntax-pp.scm: Regenerate.

* module/ice-9/boot-9.scm: Declare syntax-module.

* doc/ref/api-macros.texi: Document it.
2012-01-25 20:34:17 +01:00
Andy Wingo
3d51e57cfb add syntax-locally-bound-identifiers
* module/ice-9/boot-9.scm (syntax-locally-bound-identifiers): Declare
  variable.
* module/ice-9/psyntax.scm: Add locally-bound-identifiers helper, and
  define syntax-locally-bound-identifiers.
* module/ice-9/psyntax-pp.scm: Regenerated.
* doc/ref/api-macros.texi: Document the new procedure.
2012-01-25 20:34:16 +01:00
Andy Wingo
9b0975f1dc add syntax-local-binding
* module/ice-9/boot-9.scm (syntax-local-binding): New binding.

* module/ice-9/psyntax.scm: Locally define a fluid that holds the
  "transformer environment".  with-transformer-environment calls a
  procedure with the transformer environment, or raises an error if
  called outside the extent of a transformer.  Bind
  transformer-environment in expand-macro.
  (resolve-identifier): Backport this helper from master.
  (syntax-local-binding): New procedure to return binding information of
  a bound identifier (a lexical, macro, a pattern variable, a displaced
  lexical, a global, or some other form).

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-macros.texi (Syntax Transformer Helpers): Add docs for
  syntax-local-binding, and syntax-source, and move some other
  descriptions to this new section.
2012-01-19 12:38:27 +01:00
Andy Wingo
866ecf54c0 syntax parameters doc formatting
* doc/ref/api-macros.texi (Syntax Parameters): Some copy-editing on
  Ian's lovely syntax-parameters documentation.
2012-01-08 14:36:17 +01:00
Ian Price
729b62bd95 document syntax parameters
* doc/ref/api-macros.texi (Macros): Add subsection for "Syntax Parameters"
2012-01-08 13:28:35 +01:00
Ludovic Courtès
cf14f3011b doc: Use fashionable terminology for macros.
* doc/ref/api-macros.texi (Macros): Mention EDSLs.
2011-09-09 00:05:43 +02:00
Andy Wingo
cd4171d012 document define-syntax-rule
* doc/ref/api-macros.texi (Syntax Rules): Add define-syntax-rule.
2011-09-02 11:42:44 +02:00
Ralf Wildenhues
ecb8733562 docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-debug.texi,
doc/ref/api-io.texi, doc/ref/api-macros.texi,
doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi,
doc/ref/api-undocumented.texi, doc/ref/api-utility.texi,
doc/ref/compiler.texi, doc/ref/goops.texi,
doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi,
doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi,
doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi,
doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi,
doc/sources/env.texi, doc/sources/jimb-org.texi,
doc/sources/scheme-concepts.texi, doc/sources/unix.texi,
module/ice-9/optargs.scm: Fix typos.
* doc/r4rs/r5rs.texi: Likewise.  Do not capitalize code symbols
even at the start of a sentence.
* doc/ref/api-data.texi: Likewise.  Also, remove executable bit.
2011-02-09 22:28:49 +00:00
Noah Lavine
09cb3ae237 macro documentation fixup
* doc/ref/api-macros.texi: make the difference between pattern variables
  and lexical variables a bit clearer.
2011-02-02 20:55:14 +01:00
Neil Jerram
6887d0a1c6 Manual sections don't need a page break before
* doc/ref/api-coverage.texi (Code Coverage): Remove @page.

* doc/ref/api-foreign.texi (Foreign Function Interface): Ditto.

* doc/ref/api-lalr.texi: (LALR(1) Parsing): Ditto.

* doc/ref/api-macros.texi (Macros): Ditto.
2010-10-31 08:34:05 +00:00
Andy Wingo
7545ddd42a a number of doc fixes
* doc/ref/api-control.texi (Handling Errors): Update docs for
  display-error.

* libguile/backtrace.h (scm_i_display_error): Change prototype to
  s/stack/frame/.
* libguile/throw.c (handler_message): Change invocation of
  scm_i_display_error to pass a frame.

* doc/ref/api-deprecated.texi (Deprecation): Update wording.

* doc/ref/api-evaluation.texi (Local Evaluation): Remove section on
  local-eval.

* doc/ref/api-macros.texi: Fix a couple typos.

* doc/ref/api-memory.texi (Objects): Remove terrible section.
* doc/ref/api-procedures.texi (Procedure Properties): Remove docs for
  closure?.
  (Compiled Procedures): Update wording.

* doc/ref/guile.texi (API Reference): Remove reference to "Objects".
2010-08-16 21:36:14 -07:00
Andy Wingo
69724dde0a add settable identifier syntax docs
* doc/ref/api-macros.texi (Identifier Macros): Add documentation for
  settable identifier syntax.
2010-08-06 12:16:49 +02:00
Andy Wingo
6ffd4131ff finish macro docs
* doc/ref/api-macros.texi: Finish macro docs.
2010-03-19 13:16:57 +01:00
Andy Wingo
1fc8dcc7ac document syntax-case
* doc/ref/api-macros.texi: Document syntax-case, and tweak defmacro
  docs.

* doc/ref/api-debug.texi: Move cons-source here.
2010-03-19 12:30:38 +01:00
Andy Wingo
e4955559c6 A start at syntax-rules docs
* doc/ref/api-macros.texi: New file, documenting macros. Removed some
  old cruft, and started documenting hygienic macros.

* doc/ref/api-procedures.texi: Moved macro things out of here.

* doc/ref/guile.texi: Separate macros from procedures.

* doc/ref/api-data.texi: Update some xrefs.

* doc/ref/Makefile.am: Add api-macros.texi.
2010-03-18 23:39:44 +01:00