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

merge from 1.8 branch

This commit is contained in:
Kevin Ryde 2006-04-16 23:18:55 +00:00
parent 35369f4576
commit 1b09b607dd
49 changed files with 199 additions and 109 deletions

View file

@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in ## Process this file with Automake to create Makefile.in
## ##
## Copyright (C) 1998, 2002 Free Software Foundation, Inc. ## Copyright (C) 1998, 2002, 2006 Free Software Foundation, Inc.
## ##
## This file is part of GUILE. ## This file is part of GUILE.
## ##

View file

@ -1,5 +1,5 @@
Guile-doc NEWS --- history of user-visible changes. -*- text -*- Guile-doc NEWS --- history of user-visible changes. -*- text -*-
Copyright (C) 1997, 2001 Free Software Foundation, Inc. Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
See the end for copying conditions. See the end for copying conditions.
@ -30,7 +30,7 @@ documentation.
Copyright information: Copyright information:
Copyright (C) 1996,1997 Free Software Foundation, Inc. Copyright (C) 1996,1997, 2006 Free Software Foundation, Inc.
Permission is granted to anyone to make or distribute verbatim copies Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the of this document as received, in any medium, provided that the

View file

@ -1,6 +1,6 @@
;;; groupings.alist -*-scheme-*- ;;; groupings.alist -*-scheme-*-
;; Copyright (C) 2002 Free Software Foundation, Inc. ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2000,2001 Free Software Foundation, Inc. /* Copyright (C) 2000,2001, 2006 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,8 +1,41 @@
2006-04-15 Kevin Ryde <user42@zip.com.au>
* api-scheduling.texi (System asyncs): "{void *}" in @deffnx to keep
the "*" out of the name in the index.
2006-04-06 Kevin Ryde <user42@zip.com.au>
* posix.texi (Ports and File Descriptors): Clarify fcntl a bit,
and correction FD_CLOEXEC goes with FD_SETFD not FD_SETFL.
(Network Sockets and Communication): In accept, cross-reference to
fcntl on O_NONBLOCK.
2006-03-28 Kevin Ryde <user42@zip.com.au>
* api-compound.texi (Vector Accessing from C): Show
SCM_SIMPLE_VECTOR_SET not SCM_SIMPLE_VECTOR_SET_X, the former is
what's in vector.h.
2006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr>
* api-data.texi (Conversion): Add scm_c_locale_stringn_to_number.
2006-03-05 Kevin Ryde <user42@zip.com.au>
* api-compound.texi (Array Procedures): @pxref for `equal?'.
(Shared Arrays): Correction to make-shared-array stride example, need
`list' on the mapper return value.
2006-02-13 Marius Vollmer <mvo@zagadka.de> 2006-02-13 Marius Vollmer <mvo@zagadka.de>
* api-utility.texi (Object Properties): Removed confusing * api-utility.texi (Object Properties): Removed confusing
paragraph about 'name' property. paragraph about 'name' property.
2006-02-07 Kevin Ryde <user42@zip.com.au>
* api-modules.texi (Compiled Code Installation): Revise, in particular
@libdir@ needs to go via the makefile.
2006-02-04 Neil Jerram <neil@ossau.uklinux.net> 2006-02-04 Neil Jerram <neil@ossau.uklinux.net>
* api-control.texi (Throw Handlers): New node. * api-control.texi (Throw Handlers): New node.

View file

@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in ## Process this file with Automake to create Makefile.in
## ##
## Copyright (C) 1998, 2004 Free Software Foundation, Inc. ## Copyright (C) 1998, 2004, 2006 Free Software Foundation, Inc.
## ##
## This file is part of GUILE. ## This file is part of GUILE.
## ##

View file

@ -1,6 +1,6 @@
@c -*-texinfo-*- @c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual. @c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005 @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006
@c Free Software Foundation, Inc. @c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions. @c See the file guile.texi for copying conditions.
@ -885,7 +885,7 @@ Evaluates to the element at position @var{idx} in the simple vector
@var{vec}. No type or range checking is done. @var{vec}. No type or range checking is done.
@end deftypefn @end deftypefn
@deftypefn {C Macro} void SCM_SIMPLE_VECTOR_SET_X (SCM vec, size_t idx, SCM val) @deftypefn {C Macro} void SCM_SIMPLE_VECTOR_SET (SCM vec, size_t idx, SCM val)
Sets the element at position @var{idx} in the simple vector Sets the element at position @var{idx} in the simple vector
@var{vec} to @var{val}. No type or range checking is done. @var{vec} to @var{val}. No type or range checking is done.
@end deftypefn @end deftypefn
@ -2038,8 +2038,9 @@ is unspecified.
Return @code{#t} if all arguments are arrays with the same shape, the Return @code{#t} if all arguments are arrays with the same shape, the
same type, and have corresponding elements which are either same type, and have corresponding elements which are either
@code{equal?} or @code{array-equal?}. This function differs from @code{equal?} or @code{array-equal?}. This function differs from
@code{equal?} in that a one dimensional shared array may be @code{equal?} (@pxref{Equality}) in that a one dimensional shared
@var{array-equal?} but not @var{equal?} to a vector or uniform vector. array may be @code{array-equal?} but not @code{equal?} to a vector or
uniform vector.
@end deffn @end deffn
@c FIXME: array-map! accepts no source arrays at all, and in that @c FIXME: array-map! accepts no source arrays at all, and in that
@ -2237,7 +2238,7 @@ taken. The following is every third element,
@example @example
(make-shared-array #1(a b c d e f g h i j k l) (make-shared-array #1(a b c d e f g h i j k l)
(lambda (i) (* i 3)) (lambda (i) (list (* i 3)))
4) 4)
@result{} #1(a d g j) @result{} #1(a d g j)
@end example @end example

View file

@ -1031,6 +1031,13 @@ syntactically valid notation for a number, then
@code{string->number} returns @code{#f}. @code{string->number} returns @code{#f}.
@end deffn @end deffn
@deftypefn {C Function} SCM scm_c_locale_stringn_to_number (const char *string, size_t len, unsigned radix)
As per @code{string->number} above, but taking a C string, as pointer
and length. The string characters should be in the current locale
encoding (@code{locale} in the name refers only to that, there's no
locale-dependent parsing).
@end deftypefn
@node Complex @node Complex
@subsubsection Complex Number Operations @subsubsection Complex Number Operations

View file

@ -1247,48 +1247,51 @@ The simplest way to write a module using compiled C code is
@end example @end example
When loaded with @code{(use-modules (foo bar))}, the When loaded with @code{(use-modules (foo bar))}, the
@code{load-extension} call looks for the @file{foobar-c-code.so} @code{load-extension} call looks for the @file{foobar-c-code.so} (etc)
object file in the standard system locations, such as @file{/usr/lib} object file in the standard system locations, such as @file{/usr/lib}
or @file{/usr/local/lib}. or @file{/usr/local/lib}.
If someone installs your module to a non-standard location then the If someone installs your module to a non-standard location then the
object file won't be found. You can address this by inserting the object file won't be found. You can address this by inserting the
install location in the @file{foo/bar.scm} file. This is convenient install location in the @file{foo/bar.scm} file. This is convenient
for the user and also guarantees the intended object file is read, for the user and also guarantees the intended object is read, even if
even if stray older or newer versions are in the loader's path. stray older or newer versions are in the loader's path.
The usual way to specify an install location is with a @code{prefix} The usual way to specify an install location is with a @code{prefix}
at the configure stage, for instance @samp{./configure prefix=/opt} at the configure stage, for instance @samp{./configure prefix=/opt}
results in library object code like @file{foobar-c-code.so} going results in library files as say @file{/opt/lib/foobar-c-code.so}.
under @file{/opt/lib/foobar-c-code.so}. When using Autoconf When using Autoconf (@pxref{Top, , Introduction, autoconf, The GNU
(@pxref{Top, , Introduction, autoconf, The GNU Autoconf Manual}), the Autoconf Manual}), the library location is in a @code{libdir}
library location is in a @code{libdir} variable and it can be inserted variable. Its value is intended to be expanded by @command{make}, and
automatically by writing the scheme code as a @file{bar.scm.in}, can by substituted into a source file like @file{foo.scm.in}
@example @example
(define-module (foo bar)) (define-module (foo bar))
(load-extension "@@libdir@@/foobar-c-code" "foo_bar_init") (load-extension "XXlibdirXX/foobar-c-code" "foo_bar_init")
@end example @end example
The Autoconf manual describes how this is processed to make the actual @noindent
@file{bar.scm} which is installed (@pxref{Configuration Files, , with the following in a @file{Makefile}, using @command{sed}
Creating Configuration Files, autoconf, The GNU Autoconf Manual}). A (@pxref{Top, , Introduction, sed, SED, A Stream Editor}),
substitution can also be done explicitly in a @file{Makefile} with a
simple @code{sed} (@pxref{Top, , Introduction, sed, SED, A Stream
Editor}).
If several modules need this, it can be easier to create one @example
@file{foo/config.scm} with a define of the @code{libdir} location, and foo.scm: foo.scm.in
use that as required. sed 's|XXlibdirXX|$(libdir)|' <foo.scm.in >foo.scm
@end example
The actual pattern @code{XXlibdirXX} is arbitrary, it's only something
which doesn't otherwise occur. If several modules need the value, it
can be easier to create one @file{foo/config.scm} with a define of the
@code{libdir} location, and use that as required.
@example @example
(define-module (foo config)) (define-module (foo config))
(define-public foo-config-libdir "@@libdir@@"") (define-public foo-config-libdir "XXlibdirXX"")
@end example @end example
Such a file might have other locations too, for instance a configured Such a file might have other locations too, for instance a data
data directory for auxiliary files, or @code{localedir} if the module directory for auxiliary files, or @code{localedir} if the module has
has its own @code{gettext} message catalogue its own @code{gettext} message catalogue
(@pxref{Internationalization}). (@pxref{Internationalization}).
When installing multiple C code objects, it can be convenient to put When installing multiple C code objects, it can be convenient to put
@ -1296,12 +1299,12 @@ them in a subdirectory of @code{libdir}, thus giving for example
@code{/usr/lib/foo/some-obj.so}. If the objects are only meant to be @code{/usr/lib/foo/some-obj.so}. If the objects are only meant to be
used through the module, then a subdirectory keeps them out of sight. used through the module, then a subdirectory keeps them out of sight.
It will be noted all of the above requires that the Scheme code It will be noted all of the above requires that the Scheme code to be
modules can be found in @code{%load-path} (@pxref{Build Config}). found in @code{%load-path} (@pxref{Build Config}). Presently it's
Presently it's left up to the system administrator or each user to left up to the system administrator or each user to augment that path
augment that path when installing Guile modules in non-default when installing Guile modules in non-default locations. But having
locations. But having reached the Scheme code, that code should take reached the Scheme code, that code should take care of hitting any of
care of hitting any of its own private files etc. its own private files etc.
Presently there's no convention for having a Guile version number in Presently there's no convention for having a Guile version number in
module C code filenames or directories. This is primarily because module C code filenames or directories. This is primarily because

View file

@ -140,7 +140,7 @@ signal handlers.
@deffn {Scheme Procedure} call-with-blocked-asyncs proc @deffn {Scheme Procedure} call-with-blocked-asyncs proc
@deffnx {C Function} scm_call_with_blocked_asyncs (proc) @deffnx {C Function} scm_call_with_blocked_asyncs (proc)
@deffnx {C Function} void *scm_c_call_with_blocked_asyncs (void * (*proc) (void *data), void *data) @deffnx {C Function} {void *} scm_c_call_with_blocked_asyncs (void * (*proc) (void *data), void *data)
@findex scm_c_call_with_blocked_asyncs @findex scm_c_call_with_blocked_asyncs
Call @var{proc} and block the execution of system asyncs by one level Call @var{proc} and block the execution of system asyncs by one level
for the current thread while it is running. Return the value returned for the current thread while it is running. Return the value returned
@ -150,7 +150,7 @@ arguments; for the third, call it with @var{data}.
@deffn {Scheme Procedure} call-with-unblocked-asyncs proc @deffn {Scheme Procedure} call-with-unblocked-asyncs proc
@deffnx {C Function} scm_call_with_unblocked_asyncs (proc) @deffnx {C Function} scm_call_with_unblocked_asyncs (proc)
@deffnx {C Function} void *scm_c_call_with_unblocked_asyncs (void *(*p) (void *d), void *d) @deffnx {C Function} {void *} scm_c_call_with_unblocked_asyncs (void *(*p) (void *d), void *d)
@findex scm_c_call_with_unblocked_asyncs @findex scm_c_call_with_unblocked_asyncs
Call @var{proc} and unblock the execution of system asyncs by one Call @var{proc} and unblock the execution of system asyncs by one
level for the current thread while it is running. Return the value level for the current thread while it is running. Return the value

View file

@ -24,7 +24,7 @@
@c essay @ifinfo @c essay @ifinfo
@c essay Data Representation in Guile @c essay Data Representation in Guile
@c essay Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation @c essay Copyright (C) 1998, 1999, 2000, 2003, 2006 Free Software Foundation
@c essay Permission is granted to make and distribute verbatim copies of @c essay Permission is granted to make and distribute verbatim copies of
@c essay this manual provided the copyright notice and this permission notice @c essay this manual provided the copyright notice and this permission notice
@ -52,7 +52,7 @@
@c essay @sp 10 @c essay @sp 10
@c essay @comment The title is printed in a large font. @c essay @comment The title is printed in a large font.
@c essay @title Data Representation in Guile @c essay @title Data Representation in Guile
@c essay @subtitle $Id: data-rep.texi,v 1.19 2005-04-22 23:16:43 kryde Exp $ @c essay @subtitle $Id: data-rep.texi,v 1.20 2006-04-16 23:11:15 kryde Exp $
@c essay @subtitle For use with Guile @value{VERSION} @c essay @subtitle For use with Guile @value{VERSION}
@c essay @author Jim Blandy @c essay @author Jim Blandy
@c essay @author Free Software Foundation @c essay @author Free Software Foundation
@ -61,7 +61,7 @@
@c essay @page @c essay @page
@c essay @vskip 0pt plus 1filll @c essay @vskip 0pt plus 1filll
@c essay @vskip 0pt plus 1filll @c essay @vskip 0pt plus 1filll
@c essay Copyright @copyright{} 1998 Free Software Foundation @c essay Copyright @copyright{} 1998, 2006 Free Software Foundation
@c essay Permission is granted to make and distribute verbatim copies of @c essay Permission is granted to make and distribute verbatim copies of
@c essay this manual provided the copyright notice and this permission notice @c essay this manual provided the copyright notice and this permission notice

View file

@ -6,7 +6,7 @@
@center Version 1.2, November 2002 @center Version 1.2, November 2002
@display @display
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. Copyright @copyright{} 2000,2001,2002, 2006 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies

View file

@ -467,7 +467,7 @@ You can get the version number by invoking the command
@example @example
$ guile --version $ guile --version
Guile 1.4.1 Guile 1.4.1
Copyright (c) 1995, 1996, 1997, 2000 Free Software Foundation Copyright (c) 1995, 1996, 1997, 2000, 2006 Free Software Foundation
Guile may be distributed under the terms of the GNU General Public License; Guile may be distributed under the terms of the GNU General Public License;
certain other uses are permitted as well. For details, see the file certain other uses are permitted as well. For details, see the file
`COPYING', which is included in the Guile distribution. `COPYING', which is included in the Guile distribution.

View file

@ -474,36 +474,49 @@ If @var{size} is omitted, a default size will be used.
@deffn {Scheme Procedure} fcntl object cmd [value] @deffn {Scheme Procedure} fcntl object cmd [value]
@deffnx {C Function} scm_fcntl (object, cmd, value) @deffnx {C Function} scm_fcntl (object, cmd, value)
Apply @var{command} to the specified file descriptor or the underlying Apply @var{cmd} on @var{object}, either a port or file descriptor.
file descriptor of the specified port. @var{value} is an optional The @var{value} is an integer argument, for the @code{SET} commands.
integer argument.
Values for @var{command} are: Values for @var{cmd} are:
@defvar F_DUPFD @defvar F_DUPFD
Duplicate a file descriptor Duplicate the file descriptor, the same as @code{dup->fdes} above
does.
@end defvar @end defvar
@defvar F_GETFD @defvar F_GETFD
Get flags associated with the file descriptor. @defvarx F_SETFD
@end defvar Get or set flags associated with the file descriptor. The only flag
@defvar F_SETFD is the following,
Set flags associated with the file descriptor to @var{value}.
@end defvar
@defvar F_GETFL
Get flags associated with the open file.
@end defvar
@defvar F_SETFL
Set flags associated with the open file to @var{value}
@end defvar
@defvar F_GETOWN
Get the process ID of a socket's owner, for @code{SIGIO} signals.
@end defvar
@defvar F_SETOWN
Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.
@end defvar
@defvar FD_CLOEXEC @defvar FD_CLOEXEC
The value used to indicate the ``close on exec'' flag with @code{F_GETFL} or ``Close on exec'', meaning the file descriptor will be closed on an
@code{F_SETFL}. @code{exec} call (a successful such call). For example to set that
flag,
@example
(fcntl port F_SETFD FD_CLOEXEC)
@end example
@end defvar
@end defvar
@defvar F_GETFL
@defvarx F_SETFL
Get or set flags associated with the open file. These flags are
@code{O_RDONLY} etc described under @code{open} above.
A common use is to set @code{O_NONBLOCK} on a network socket. The
following sets that flag, and leaves other flags unchanged.
@example
(fcntl sock F_SETFL
(logior (fcntl sock F_GETFL) O_NONBLOCK))
@end example
@end defvar
@defvar F_GETOWN
@defvarx F_SETOWN
Get or set the process ID of a socket's owner, for @code{SIGIO} signals.
@end defvar @end defvar
@end deffn @end deffn
@ -2789,8 +2802,9 @@ The return value is unspecified.
@deffnx {C Function} scm_accept (sock) @deffnx {C Function} scm_accept (sock)
Accept a connection from socket port @var{sock} which has been enabled Accept a connection from socket port @var{sock} which has been enabled
for listening with @code{listen} above. If there are no incoming for listening with @code{listen} above. If there are no incoming
connections in the queue, wait until one is available (unless the connections in the queue, wait until one is available (unless
non-blocking option has been set on the socket). @code{O_NONBLOCK} has been set on the socket, @pxref{Ports and File
Descriptors,@code{fcntl}}).
The return value is a pair. The @code{car} is a new socket port, The return value is a pair. The @code{car} is a new socket port,
connected and ready to communicate. The @code{cdr} is a socket connected and ready to communicate. The @code{cdr} is a socket

View file

@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in ## Process this file with Automake to create Makefile.in
## ##
## Copyright (C) 1998 Free Software Foundation, Inc. ## Copyright (C) 1998, 2006 Free Software Foundation, Inc.
## ##
## This file is part of GUILE. ## This file is part of GUILE.
## ##

View file

@ -34,7 +34,7 @@
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
Copyright @copyright{} 1997, 1998, 2004 Free Software Foundation Copyright @copyright{} 1997, 1998, 2004, 2006 Free Software Foundation
Permission is granted to make and distribute verbatim copies of Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice this manual provided the copyright notice and this permission notice
@ -60,7 +60,7 @@ by the author.
@ifinfo @ifinfo
This file gives a tutorial introduction to Guile. This file gives a tutorial introduction to Guile.
Copyright (C) 1997, 2004 Free Software Foundation Copyright (C) 1997, 2004, 2006 Free Software Foundation
Permission is granted to make and distribute verbatim copies of Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice this manual provided the copyright notice and this permission notice

View file

@ -1,7 +1,15 @@
2006-03-12 Neil Jerram <neil@ossau.uklinux.net>
* ice-9/readline.scm (make-completion-function): New.
2006-02-06 Marius Vollmer <mvo@zagadka.de> 2006-02-06 Marius Vollmer <mvo@zagadka.de>
* LIBGUILEREADLINE-VERSION: Bumped versions for 1.9 series. * LIBGUILEREADLINE-VERSION: Bumped versions for 1.9 series.
2006-02-06 Marius Vollmer <mvo@zagadka.de>
* LIBGUILEREADLINE-VERSION: Bumped versions for 1.8.
2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de> 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* readline.c: Use scm_current_input_port instead of scm_cur_inp. * readline.c: Use scm_current_input_port instead of scm_cur_inp.

View file

@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in ## Process this file with Automake to create Makefile.in
## ##
## Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. ## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
## ##
## This file is part of GUILE. ## This file is part of GUILE.
## ##

View file

@ -1,7 +1,7 @@
## Process this file with Automake to create Makefile.in ## Process this file with Automake to create Makefile.in
## ##
## Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ## Copyright (C) 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
## Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ## Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
## ##
## This file is part of GUILE. ## This file is part of GUILE.
## ##

View file

@ -1,6 +1,6 @@
;;;; readline.scm --- support functions for command-line editing ;;;; readline.scm --- support functions for command-line editing
;;;; ;;;;
;;;; Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;;;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
;;;; ;;;;
;;;; This program is free software; you can redistribute it and/or modify ;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by ;;;; it under the terms of the GNU General Public License as published by
@ -35,7 +35,7 @@
;;; but only when it isn't already present. ;;; but only when it isn't already present.
(if (not (provided? 'readline)) (if (not (provided? 'readline))
(load-extension "libguilereadline-v-16" "scm_init_readline")) (load-extension "libguilereadline-v-17" "scm_init_readline"))
(if (not (provided? 'readline)) (if (not (provided? 'readline))
(scm-error 'misc-error (scm-error 'misc-error
@ -216,3 +216,27 @@
(set-readline-prompt! "" "") (set-readline-prompt! "" "")
(set-readline-read-hook! #f))))) (set-readline-read-hook! #f)))))
(set! (using-readline?) #t)))) (set! (using-readline?) #t))))
(define-public (make-completion-function strings)
"Construct and return a completion function for a list of strings.
The returned function is suitable for passing to
@code{with-readline-completion-function. The argument @var{strings}
should be a list of strings, where each string is one of the possible
completions."
(letrec ((strs '())
(regexp #f)
(completer (lambda (text continue?)
(if continue?
(if (null? strs)
#f
(let ((str (car strs)))
(set! strs (cdr strs))
(if (string-match regexp str)
str
(completer text #t))))
(begin
(set! strs strings)
(set! regexp
(string-append "^" (regexp-quote text)))
(completer text #t))))))
completer))

View file

@ -1,6 +1,6 @@
/* readline.c --- line editing support for Guile */ /* readline.c --- line editing support for Guile */
/* Copyright (C) 1997,1999,2000,2001, 2002, 2003 Free Software Foundation, Inc. /* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,7 +1,7 @@
#ifndef READLINEH #ifndef READLINEH
#define READLINEH #define READLINEH
/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. /* Copyright (C) 1997, 1999, 2000, 2006 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in ## Process this file with Automake to create Makefile.in
## ##
## Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. ## Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
## ##
## This file is part of GUILE. ## This file is part of GUILE.
## ##

View file

@ -2,7 +2,7 @@
#define SCM_SRFI_1_H #define SCM_SRFI_1_H
/* srfi-1.h --- SRFI-1 procedures for Guile /* srfi-1.h --- SRFI-1 procedures for Guile
* *
* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. * Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-1.scm --- List Library ;;; srfi-1.scm --- List Library
;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-10.scm --- Hash-Comma Reader Extension ;;; srfi-10.scm --- Hash-Comma Reader Extension
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-11.scm --- let-values and let*-values ;;; srfi-11.scm --- let-values and let*-values
;; Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. ;; Copyright (C) 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
/* srfi-13.c --- old place of SRFI-13 procedures for Guile /* srfi-13.c --- old place of SRFI-13 procedures for Guile
* *
* Copyright (C) 2001, 2004 Free Software Foundation, Inc. * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -3,7 +3,7 @@
/* SRFI-13 procedures for Guile /* SRFI-13 procedures for Guile
* *
* Copyright (C) 2001, 2004 Free Software Foundation, Inc. * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-13.scm --- String Library ;;; srfi-13.scm --- String Library
;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
/* srfi-14.c --- Old place of SRFI-14 procedures for Guile /* srfi-14.c --- Old place of SRFI-14 procedures for Guile
* *
* Copyright (C) 2001, 2004 Free Software Foundation, Inc. * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -2,7 +2,7 @@
#define SCM_SRFI_14_H #define SCM_SRFI_14_H
/* srfi-14.c --- SRFI-14 procedures for Guile /* srfi-14.c --- SRFI-14 procedures for Guile
* *
* Copyright (C) 2001, 2004 Free Software Foundation, Inc. * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-14.scm --- Character-set Library ;;; srfi-14.scm --- Character-set Library
;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-16.scm --- case-lambda ;;; srfi-16.scm --- case-lambda
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-17.scm --- Generalized set! ;;; srfi-17.scm --- Generalized set!
;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-19.scm --- Time/Date Library ;;; srfi-19.scm --- Time/Date Library
;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-2.scm --- and-let* ;;; srfi-2.scm --- and-let*
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-26.scm --- specializing parameters without currying. ;;; srfi-26.scm --- specializing parameters without currying.
;; Copyright (C) 2002 Free Software Foundation, Inc. ;; Copyright (C) 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-31.scm --- special form for recursive evaluation ;;; srfi-31.scm --- special form for recursive evaluation
;; Copyright (C) 2004 Free Software Foundation, Inc. ;; Copyright (C) 2004, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-34.scm --- Exception handling for programs ;;; srfi-34.scm --- Exception handling for programs
;; Copyright (C) 2003 Free Software Foundation, Inc. ;; Copyright (C) 2003, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-39.scm --- Parameter objects ;;; srfi-39.scm --- Parameter objects
;; Copyright (C) 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
;; ;;
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as

View file

@ -1,6 +1,6 @@
/* srfi-4.c --- Homogeneous numeric vector datatypes. /* srfi-4.c --- Homogeneous numeric vector datatypes.
* *
* Copyright (C) 2001, 2004 Free Software Foundation, Inc. * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -2,7 +2,7 @@
#define SCM_SRFI_SRFI_4_H #define SCM_SRFI_SRFI_4_H
/* srfi-4.c --- Homogeneous numeric vector datatypes. /* srfi-4.c --- Homogeneous numeric vector datatypes.
* *
* Copyright (C) 2001 Free Software Foundation, Inc. * Copyright (C) 2001, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-4.scm --- Homogeneous Numeric Vector Datatypes ;;; srfi-4.scm --- Homogeneous Numeric Vector Datatypes
;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-6.scm --- Basic String Ports ;;; srfi-6.scm --- Basic String Ports
;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
/* srfi-60.h --- SRFI-60 procedures for Guile /* srfi-60.h --- SRFI-60 procedures for Guile
* *
* Copyright (C) 2005 Free Software Foundation, Inc. * Copyright (C) 2005, 2006 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-60.scm --- Integers as Bits ;;; srfi-60.scm --- Integers as Bits
;; Copyright (C) 2005 Free Software Foundation, Inc. ;; Copyright (C) 2005, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-8.scm --- receive ;;; srfi-8.scm --- receive
;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public

View file

@ -1,6 +1,6 @@
;;; srfi-9.scm --- define-record-type ;;; srfi-9.scm --- define-record-type
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public