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

2603 commits

Author SHA1 Message Date
Michael Gran
7b41294049 Improve DLL search strategy for load-foreign-library
The new non-libltdl foreign library loading algorithm from 3.0.6
fails to cover common cases regarding how libtool names and installs
DLL files.  Notably, it fails to recognize when libtool has added the
major version number into the filename itself, such as libfoo-1.dll
Also, it does not search in binary directories and the PATH for DLL
files, where libtool is likely to install DLLs.

This adds the option to search for dlls with major version numbers
in the filename, and modifies the search strategy for DLL-using
OSs to check bindir and PATH.

For MSYS, libraries are installed with the 'msys-' prefix. So this
modifies load-foreign-library to handle that prefix as well.
It changes the #:rename-on-cygwin? option to #:host-type-rename? to
better reflect that is works on both Cygwin and MSYS.

Partially based on a patch by Hannes Müller.

* NEWS: updated
* doc/ref/api-foreign.texi: document updates to load-foreign-library
  and system-dll-path
* module/system/foreign-library.scm (is-integer-string?): new utility function
  (dll-name-match?): new utility function
  (find-best-dll-from-matches): new utility function
  (dll-exists-with-version): new function that implements new dll search logic
  (file-exists-with-extension): add flag argument to allow new dll search
  (file-exists-in-path-with-extension): add flag argument to all new dll search
  (system-dll-path): new parameter
  (lib->msys): new helper function
  (load-foreign-library): add new optarg flag #:allow-dll-version-suffix?
    Pass new flag to library search functions.
    Implement new search strategy for #:search-system-paths? on DLL systems'
    replace #:rename-on-cygwin? with #:host-type-rename?
        Use that option to rename both MSYS and Cygwin libraries.
  (guile-system-extensions-path): prefer bindir to libdir on DLL systems
* test-suite/tests/foreign.test ("dll-name-match?"): new test category
  ("find-best-dll-from-matches"): new test category
  ("lib->msys"): new unit tests
2025-03-22 07:05:31 -07:00
Arun Isaac
7dde220750 Replace "either" with "either array" in make-shared-array docs
* doc/ref/api-data.texi (Shared Arrays): Replace "either" with "either
array" in make-shared-array documentation.

Closes: 42228
2025-03-20 13:37:04 -05:00
Rob Browning
e1a6622b3b Note setlocale raises a system-error when locale doesn't exist
doc/ref/posix.texi: note setlocale raises a system-error when locale
doesn't exist

Thanks to Francesco P. Lovergine for suggesting the
addition (https://bugs.debian.org/1078681).
2025-03-02 14:33:30 -06:00
Morgan Smith
a58c2d21f4
doc: Remove reference to long-gone tutorial.
The tutorial was removed in commit f75c5849cd.

* doc/README: Remove reference to a tutorial that no longer exists

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-28 22:12:03 +01:00
Morgan Smith
93119355b9
doc: Remove all remaining references to GDS.
This finished what this previous commit was meant to do:
767dbb1af3

* .gitignore: Remove "gds-test.debug" and "gds-test.transcript".
* doc/ref/Makefile.am (PICTURES): Remove "gds.eps", "gds.pdf", and "gds.txt".
* doc/ref/gds.dia:
* doc/ref/gds.eps:
* doc/ref/gds.pdf:
* doc/ref/gds.txt: Delete files

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-28 22:12:03 +01:00
Ludovic Courtès
b3a4dea943
doc: Update ‘release.org’.
* doc/release.org: Update links to CI and the web site.  Clarify what’s
optional.  Remove references to discontinued services.
2025-02-28 22:12:02 +01:00
Tomas Volf
c1353972ee srfi-19: Fix ~V converter in date->string.
The ~V is supposed to print ISO week number, not a week number.  This
commit fixes that.

* module/srfi/srfi-19.scm (date-week-number-iso): New procedure taken
  from the reference implementation.
  (directives)<#\V>: Use it.
* test-suite/tests/srfi-19.test ("date->string ~V"): Add tests taken
  from the reference test suite.
* doc/ref/srfi-modules.texi (SRFI-19 Date to string): Mention ISO-8601
  in description for ~V.

Fixes <https://bugs.gnu.org/74841>.
Edited by lloda <lloda@sarc.name>.
2025-02-28 10:28:06 +01:00
Tomas Volf
46a0ee7779 Fix typos in comments.
* module/sxml/xpath.scm: Fix typo in a comment.
* module/sxml/upstream/SXPath-old.scm: Same.
* doc/ref/sxml.texi (SXPath): Reflect in the documentation.
* doc/ref/texinfo.texi (string-utils): Fix same typo.
* module/texinfo/string-utils.scm (expand-tabs): Same.

Fixes <https://bugs.gnu.org/76621>.
Edited by lloda <lloda@sarc.name>.
2025-02-28 09:58:29 +01:00
Maxim Cournoyer
f109baebc0 doc/srfi-64: Fix typos and add examples.
* doc/ref/srfi-modules.texi (SRFI-64 Writing Basic Test Suites): Fix
  typo.  Add default test runner example.  Add test-approximate and
  test-error examples.  Document valid error types in Guile for test-error.

  (SRFI-64 Conditonal Test Suites and Other Advanced Features): Fix typo.

Fixes <https://bugs.gnu.org/75041>.

Suggested-by: Arne Babenhauserheide <arne_bab@web.de>
2025-01-24 10:54:01 +01:00
Yuval Langer
0b501477f9 Fix faulty SRFI-31 example. 2025-01-20 10:52:49 +01:00
Tomas Volf
f6359a4715
doc: srfi-19: Use day' instead of date' for `make-date'.
Looking at the SRFI-19 specification, the argument is called `day', not
`date'.  Even the accessor is called `date-day'.  So adjust the
documentation to match.

Also adjust the (web http) module, which was using `date' as well.

* doc/ref/srfi-modules.texi (SRFI-19 Date): Use `day' instead of `date'.
* module/web/http.scm (parse-rfc-822-date, parse-rfc-850-date)
(parse-asctime-date): Same.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:46:11 +01:00
Maxim Cournoyer
98ffeacf2c
doc: Document SRFI-64.
This is an import of the 'Abstract', 'Rationale', and 'Specification'
sections from the upstream specification text, with some manual
adjustment.

* doc/ref/srfi-modules.texi (SRFI 64): New subsection.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:46:11 +01:00
Ekaitz Zarraga
c9d0a0c48c
doc: Add explanation on how to avoid escaping in SXML
* doc/ref/sxml.texi (Reading and Writing XML): Add explanation on using
  a procedure to avoid escaping.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:46:11 +01:00
Ekaitz Zarraga
d987e7e7cb
doc: Fix typo in SXML section.
* doc/ref/sxml.texi (Reading and Writing XML): Remove "."

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-22 22:45:59 +01:00
Adam Faiz
c2829e4a86 New line or field iteration procedures in (ice-9 rdelim)
* NEWS: Update
* module/ice-9/rdelim (for-rdelim-from-port, for-delimited-from-port,
  for-line-in-file): New procedures.
* doc/ref/api-io.texi: Documentation of `for-rdelim-for-port`-related
  procedures.
* test-suite/tests/rdelim.test: Tests for `for-rdelim-for-port`-related
  procedures.

Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2024-12-19 22:36:38 +01:00
Mikael Djurfeldt
98c8a014b2 Add clarification about the less predicate passed to merge and sort 2024-12-09 23:46:20 +01:00
Ekaitz Zarraga
25504ba216
PEG: Add support for not-in-range and [^...]
Modern PEG supports inversed class like `[^a-z]` that would get any
character not in the `a-z` range. This commit adds support for that and
also for a new `not-in-range` PEG pattern for scheme.

* module/ice-9/peg/codegen.scm (cg-not-in-range): New function.
* module/ice-9/peg/string-peg.scm: Add support for `[^...]`
* test-suite/tests/peg.test: Test it.
* doc/ref/api-peg.texi: Document accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-09 18:15:01 +01:00
Ekaitz Zarraga
ff11753df1
PEG: Add full support for PEG + some extensions
This commit adds support for PEG as described in:

    <https://bford.info/pub/lang/peg.pdf>

It adds support for the missing features (comments, underscores in
identifiers and escaping) while keeping the extensions (dashes in
identifiers, < and <--).

The naming system tries to be as close as possible to the one proposed
in the paper.

* module/ice-9/peg/string-peg.scm: Rewrite PEG parser.
* test-suite/tests/peg.test: Fix import

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-09 18:13:08 +01:00
Mikael Djurfeldt
c78abcb765 Updated GOOPS sections of reference
* doc/ref/goops.texi: Insert reference to the "definition" of
next-method the first time next-method is mentioned. Place the
definition of next-method in index. Don't use capital methods in generic
function names (corrected only in one node). In section about
next-method, say that you can provide custom arguments (which we can now
due to the optimizing compiler). New node "Inheritance and accessors"
explaining how new accessor methods are created for subclasses.
2024-11-28 21:54:30 +01:00
Mikael Djurfeldt
fe05646f7c New module (oop goops keyword-formals)
This module replaces the method and define-method bindings with their
method* and define-method* counterparts, for use by users who prefer not
to use both kinds of syntactic forms.

* module/oop/goops/keyword-formals.scm: New module.
* am/bootstrap.am: Added
* doc/ref/goops.texi: Document this change.
2024-11-26 19:02:07 +01:00
Mikael Djurfeldt
5307329d1a Document method* and define-method* 2024-11-25 21:47:53 +01:00
Tomas Volf
1c093d8bc4
doc: Recommend alist-copy instead of list-copy.
The current recommendation of `list-copy' is not right and does not lead
to preserving the original list:

    scheme@(guile-user)> (define x (list (cons 'a 1) (cons 'b 2)))
    scheme@(guile-user)> (define y (list-copy x))
    scheme@(guile-user)> (assq-set! y 'b 3)
    $1 = ((a . 1) (b . 3))
    scheme@(guile-user)> x
    $2 = ((a . 1) (b . 3))

Correct approach seems to be use `alist-copy' from SRFI-1 leading to the
expected behavior of:

    scheme@(guile-user)> ,use (srfi srfi-1)
    scheme@(guile-user)> (define x (list (cons 'a 1) (cons 'b 2)))
    scheme@(guile-user)> (define y (alist-copy x))
    scheme@(guile-user)> (assq-set! y 'b 3)
    $1 = ((a . 1) (b . 3))
    scheme@(guile-user)> x
    $2 = ((a . 1) (b . 2))

* doc/ref/api-data.texi (Adding or Setting Alist Entries): Recommend
`alist-copy'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:45:11 +02:00
Nikolaos Chatzikonstantinou
a0368a6120
doc: Fix typo in FFI documentation.
The incorrect procedure is mentioned; see the example that immediately
follows.

* doc/ref/api-foreign.texi (Foreign Functions): fix typo to
pointer->procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:45:03 +02:00
Juliana Sims
8d45f63c85
doc: Document the peek and pk procedures.
* doc/ref/api-debug.texi: Document the peek and pk procedures.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:44:41 +02:00
Tomas Volf
bfff7e1d6d
doc: Fix implication of omitting optional arguments.
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>
2024-10-26 19:44:40 +02:00
Tomas Volf
130fdb0c8d
doc: Document #:hide.
* doc/ref/api-modules.texi (Using Guile Modules): Document #:hide.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:44:40 +02:00
Daniel Llorens
818b879b2e doc: Fix use of literals in alist example
Fixes https://bugs.gnu.org/32841.

* doc/ref/srfi-modules.texi (alist-copy): Add anchor.
* doc/ref/api-data.texi (Alist Example): Fix use of literals.
2024-10-22 11:42:20 +02:00
Andrew McNulty
b7bd440f22
Fix typo in dynamic wind documentation.
* doc/ref/api-control.texi: Fix typo in dynamic wind
documentation.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-20 21:22:22 +02:00
Matthew Wette
78e9e51065 Redirect diagnostice output messages (e.g., auto-compiling code) to a newly defined current-info-port, and add a command line argument -I' to set the current-info-port to a void-port. * libguile/ports.c: add cur_infoport_fluid, scm_current_info_port, scm_set_current_info_port; define default current-info-port to stderr * libguile/load.c(compiled_is_fresh,load_thunk_from_path, do_try_auto_compile,scm_sys_warn_auto_compilation_enabled, scm_primitive_load_path): direct output messages to current_info_port; was current_warning_port * libguile/init.c(scm_init_standard_ports): set default current_info_port * module/ice-9/ports.scm: define current-info-port and set-current-info-port * module/ice-9/command-line.scm(*usage*,compile-shell-switches): add argument -I' to silence diagnostics (or current-info-port to void-port) * doc/ref/guile-invoke.texi: add description for `-I' command argument 2024-10-12 13:16:25 +02:00
Daniel Llorens
83d6d6afd9 Better error messages in array functions
* doc/ref/api-data.texi (Arrays as arrays of arrays): Clarify
  ambiguities, fix examples.
* libguile/arrays.c (make-shared-array): Make error messages specific to
  each error case, report relevant arguments.
  (array_from_pos): Return NULL on error instead of reporting error
  ourselves.
  (array_from_get_o): Handle the trivial case.
  (scm_array_slice, scm_array_cell_ref, scm_array_cell_set_x): Don't
  build error arguments before error happens. Let array_from_get_o
  handle the trivial case.
2024-08-12 14:24:58 +02:00
Yuval Langer
2047b532fa api-data.texi: fix typo in "Real and Rational Numbers" section
* doc/ref/api-data.texi: fix typo in "Real and Rational Numbers" section

[rlb@defaultvalue.org: adjust commit message]

Closes: 59572
2024-08-03 14:25:10 -05:00
Richard Sent
8535682dda doc: Mention how to remove namespaces in xml->sxml.
* doc/ref/sxml.texi (Reading and Writing XML): Document behavior of #f
namespace prefix.

This documents behavior discussed in
https://lists.gnu.org/archive/html/guile-user/2024-07/msg00013.html.
2024-07-23 08:23:43 +02:00
Andy Wingo
7401ca75b3 Add link to foreign functions from gsubr doc
* doc/ref/api-procedures.texi (Primitive Procedures): Add link.
2024-06-20 14:39:41 +02:00
Andy Wingo
305b2fa70c Add documentation on embedded procedure properties
* doc/ref/api-procedures.texi (Procedure Properties): Document inline
procedure properties.
2024-06-20 13:54:31 +02:00
Maxim Cournoyer
4fe6d19a5b bug#71303: [PATCH] doc: Fix typo in PEG example.
* doc/ref/api-peg.texi (PEG API Reference): Fix typo in PEG example.
2024-06-18 10:36:50 +02:00
Arne Babenhauserheide
dce65edbaf
Add language/wisp, Wisp tests, and SRFI-119 documentation
* doc/ref/srfi-modules.texi (srfi-119): add node
* module/language/wisp.scm: New file.
* module/language/wisp/spec.scm: New file.
* test-suite/tests/srfi-119.test: New file.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-01 11:50:16 +02:00
Rob Browning
779a83d9c6 make-foreign-object-type: add #:super to provide superclasses
* module/system/foreign-object.scm (make-foreign-object-type): allow
specification of superclasses via #:super.
2024-05-17 12:53:39 -05:00
Juliana Sims
a222503a89
Second argument of ‘unread-string’ is optional.
Fixes <https://bugs.gnu.org/67063>.

* doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
procedure documentation in line with other procedures in the section.
* libguile/ports.c (scm_unread_string): Make port argument optional.
* test-suite/tests/ports.test: Test unread-char and unread-string
without ports.
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-06 11:51:53 +02:00
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
Ludovic Courtès
696acfc9e5
‘seek’ now accepts ‘SEEK_DATA’ and ‘SEEK_HOLE’ where supported.
* libguile/ports.c (scm_seek): Let SEEK_DATA and SEEK_HOLE through.
(scm_init_ice_9_ports): Define ‘SEEK_DATA’ and ‘SEEK_HOLE’.
* module/ice-9/ports.scm: Export ‘SEEK_DATA’ and ‘SEEK_HOLE’ when
defined.
* test-suite/tests/ports.test ("size of sparse file")
("SEEK_DATA while on data", "SEEK_DATA while in hole")
("SEEK_HOLE while in hole"): New tests.
* NEWS: Update.
2024-04-15 19:58:25 +02:00
Rob Browning
db7efa5d20 api-procedures.texi: remove make-binding, binding:name/boxed?/...
* doc/ref/api-procedures.texi: remove make-binding, binding:name,
binding:boxed?, binding:index, binding:start, and binding:end since they
no longer exist.

cf. 1a2711a848
2024-04-05 17:58:20 -05:00
Andy Wingo
e15617dc0e Expose read-c-struct, write-c-struct syntax
* module/system/foreign.scm (read-c-struct): Rename from read-fields.
Export.
(write-c-struct): Rename from write-fields.  Export.
(%write-c-struct, %read-c-struct): Add % prefix to these private
bindings.
2024-03-17 21:40:58 +01:00
Tomas Volf
e1690f3fd2
Add copy-on-write support to scm_copy_file.
On modern file-systems (BTRFS, ZFS) it is possible to copy a file using
copy-on-write method.  For large files it has the advantage of being
much faster and saving disk space (since identical extents are not
duplicated).  This feature is stable and for example coreutils' `cp'
does use it automatically (see --reflink).

This commit adds support for this feature into our copy-file procedure.
Same as `cp', it defaults to 'auto, meaning the copy-on-write is
attempted, and in case of failure the regular copy is performed.

No tests are provided, because the behavior depends on the system,
underlying file-system and its configuration.  That makes it challenging
to write a test for it.  Manual testing was performed instead:

    $ btrfs filesystem du /tmp/cow*
         Total   Exclusive  Set shared  Filename
      36.00KiB    36.00KiB       0.00B  /tmp/cow

    $ cat cow-test.scm
    (copy-file "/tmp/cow" "/tmp/cow-unspecified")
    (copy-file "/tmp/cow" "/tmp/cow-always" #:copy-on-write 'always)
    (copy-file "/tmp/cow" "/tmp/cow-auto" #:copy-on-write 'auto)
    (copy-file "/tmp/cow" "/tmp/cow-never" #:copy-on-write 'never)
    (copy-file "/tmp/cow" "/dev/shm/cow-unspecified")
    (copy-file "/tmp/cow" "/dev/shm/cow-auto" #:copy-on-write 'auto)
    (copy-file "/tmp/cow" "/dev/shm/cow-never" #:copy-on-write 'never)
    $ ./meta/guile -s cow-test.scm

    $ btrfs filesystem du /tmp/cow*
         Total   Exclusive  Set shared  Filename
      36.00KiB       0.00B    36.00KiB  /tmp/cow
      36.00KiB       0.00B    36.00KiB  /tmp/cow-always
      36.00KiB       0.00B    36.00KiB  /tmp/cow-auto
      36.00KiB    36.00KiB       0.00B  /tmp/cow-never
      36.00KiB       0.00B    36.00KiB  /tmp/cow-unspecified

    $ sha1sum /tmp/cow* /dev/shm/cow*
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-always
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-auto
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-never
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-unspecified
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /dev/shm/cow-auto
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /dev/shm/cow-never
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /dev/shm/cow-unspecified

This commit also adds to new failure modes for (copy-file).

Failure to copy-on-write when 'always was passed in:

    scheme@(guile-user)> (copy-file "/tmp/cow" "/dev/shm/cow" #:copy-on-write 'always)
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    In procedure copy-file: copy-on-write failed: Invalid cross-device link

Passing in invalid value for the #:copy-on-write keyword argument:

    scheme@(guile-user)> (copy-file "/tmp/cow" "/dev/shm/cow" #:copy-on-write 'nevr)
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    In procedure copy-file: invalid value for #:copy-on-write: nevr

* NEWS: Add note for copy-file supporting copy-on-write.
* configure.ac: Check for linux/fs.h.
* doc/ref/posix.texi (File System)[copy-file]: Document the new
signature.
* libguile/filesys.c (clone_file): New function cloning a file using
FICLONE, if supported.
(k_copy_on_write): New keyword.
(sym_always, sym_auto, sym_never): New symbols.
(scm_copy_file2): Renamed from scm_copy_file.  New #:copy-on-write
keyword argument.  Attempt copy-on-write copy by default.
(scm_copy_file): Call scm_copy_file2.
* libguile/filesys.h: Add scm_copy_file2 as SCM_INTERNAL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-12 14:04:41 +01:00
Tomas Volf
2556b9a216
bug#68507: [PATCH] doc: Fix example in list-transduce example.
While the `.' might be correct from a grammatical point of view (I do
not know), it turns the example into invalid scheme code, which is not
ideal.  New users (like me) might try to copy the whole line and wonder
why it does not work (like I did).  So delete it.

* doc/ref/srfi-modules.texi (SRFI-171 General Discussion): Delete the
trailing . from the example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-24 11:14:10 +01:00
Ludovic Courtès
65c054fe56
doc: Remove reference to “benevolent dictators”.
Fixes <https://bugs.gnu.org/63366>.
Suggested by Sebastian Carlos <sebaaa1754@gmail.com>.

* doc/ref/intro.texi (Introduction): Remove reference to Python and
Perl, which no longer have “benevolent dictators”.
2024-01-24 11:12:06 +01:00
無無
d8df317baf Minor typo in the manual
* doc/ref/api-modules.texi: Fix typo.

Fixes <https://bugs.gnu.org/67487>.

Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2023-11-28 11:18:05 +01: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
Andy Wingo
c2cba86785 Better compilation of calls to raise-exception
Recognize `raise-exception` in the same way we recognize `throw`, though
it is a bit less optimized and the boot story is not as complicated.

* doc/ref/vm.texi (Non-Local Control Flow Instructions):
* libguile/jit.c (compile_unreachable):
(compile_unreachable_slow):
* libguile/vm-engine.c (VM_NAME):
* module/language/cps/compile-bytecode.scm (compile-function):
* module/system/vm/assembler.scm (emit-unreachable): Add new
"unreachable" instruction, inserted after a call to non-continuable
`raise-exception`.
* module/language/tree-il/compile-cps.scm (raise-exception):
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*): Recognize raise-exception, and if it is
called with just one argument, prune that branch of the control-flow
graph.
2023-08-28 12:11:19 +02:00
Andy Wingo
c7632b8f97 Revert recent change to r5rs.texi
* doc/r5rs/r5rs.texi: Revert c7d170c5d1,
as R5RS is a historical document, and our packaging of it is something
that other people rely on.  See also
7fb9c4aff2 when I was also bitten by this
error!
2023-08-17 14:37:30 +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