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:
parent
35369f4576
commit
1b09b607dd
49 changed files with 199 additions and 109 deletions
|
@ -1,6 +1,6 @@
|
|||
## 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.
|
||||
##
|
||||
|
|
4
doc/NEWS
4
doc/NEWS
|
@ -1,5 +1,5 @@
|
|||
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.
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ documentation.
|
|||
|
||||
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
|
||||
of this document as received, in any medium, provided that the
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU General Public License as
|
||||
|
|
|
@ -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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -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>
|
||||
|
||||
* api-utility.texi (Object Properties): Removed confusing
|
||||
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>
|
||||
|
||||
* api-control.texi (Throw Handlers): New node.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 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.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@c -*-texinfo-*-
|
||||
@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 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.
|
||||
@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
|
||||
@var{vec} to @var{val}. No type or range checking is done.
|
||||
@end deftypefn
|
||||
|
@ -2038,8 +2038,9 @@ is unspecified.
|
|||
Return @code{#t} if all arguments are arrays with the same shape, the
|
||||
same type, and have corresponding elements which are either
|
||||
@code{equal?} or @code{array-equal?}. This function differs from
|
||||
@code{equal?} in that a one dimensional shared array may be
|
||||
@var{array-equal?} but not @var{equal?} to a vector or uniform vector.
|
||||
@code{equal?} (@pxref{Equality}) in that a one dimensional shared
|
||||
array may be @code{array-equal?} but not @code{equal?} to a vector or
|
||||
uniform vector.
|
||||
@end deffn
|
||||
|
||||
@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
|
||||
(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)
|
||||
@result{} #1(a d g j)
|
||||
@end example
|
||||
|
|
|
@ -1031,6 +1031,13 @@ syntactically valid notation for a number, then
|
|||
@code{string->number} returns @code{#f}.
|
||||
@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
|
||||
@subsubsection Complex Number Operations
|
||||
|
|
|
@ -1247,48 +1247,51 @@ The simplest way to write a module using compiled C code is
|
|||
@end example
|
||||
|
||||
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}
|
||||
or @file{/usr/local/lib}.
|
||||
|
||||
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
|
||||
install location in the @file{foo/bar.scm} file. This is convenient
|
||||
for the user and also guarantees the intended object file is read,
|
||||
even if stray older or newer versions are in the loader's path.
|
||||
for the user and also guarantees the intended object is read, even if
|
||||
stray older or newer versions are in the loader's path.
|
||||
|
||||
The usual way to specify an install location is with a @code{prefix}
|
||||
at the configure stage, for instance @samp{./configure prefix=/opt}
|
||||
results in library object code like @file{foobar-c-code.so} going
|
||||
under @file{/opt/lib/foobar-c-code.so}. When using Autoconf
|
||||
(@pxref{Top, , Introduction, autoconf, The GNU Autoconf Manual}), the
|
||||
library location is in a @code{libdir} variable and it can be inserted
|
||||
automatically by writing the scheme code as a @file{bar.scm.in},
|
||||
results in library files as say @file{/opt/lib/foobar-c-code.so}.
|
||||
When using Autoconf (@pxref{Top, , Introduction, autoconf, The GNU
|
||||
Autoconf Manual}), the library location is in a @code{libdir}
|
||||
variable. Its value is intended to be expanded by @command{make}, and
|
||||
can by substituted into a source file like @file{foo.scm.in}
|
||||
|
||||
@example
|
||||
(define-module (foo bar))
|
||||
(load-extension "@@libdir@@/foobar-c-code" "foo_bar_init")
|
||||
(load-extension "XXlibdirXX/foobar-c-code" "foo_bar_init")
|
||||
@end example
|
||||
|
||||
The Autoconf manual describes how this is processed to make the actual
|
||||
@file{bar.scm} which is installed (@pxref{Configuration Files, ,
|
||||
Creating Configuration Files, autoconf, The GNU Autoconf Manual}). A
|
||||
substitution can also be done explicitly in a @file{Makefile} with a
|
||||
simple @code{sed} (@pxref{Top, , Introduction, sed, SED, A Stream
|
||||
Editor}).
|
||||
@noindent
|
||||
with the following in a @file{Makefile}, using @command{sed}
|
||||
(@pxref{Top, , Introduction, sed, SED, A Stream Editor}),
|
||||
|
||||
If several modules need this, 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
|
||||
foo.scm: foo.scm.in
|
||||
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
|
||||
(define-module (foo config))
|
||||
(define-public foo-config-libdir "@@libdir@@"")
|
||||
(define-public foo-config-libdir "XXlibdirXX"")
|
||||
@end example
|
||||
|
||||
Such a file might have other locations too, for instance a configured
|
||||
data directory for auxiliary files, or @code{localedir} if the module
|
||||
has its own @code{gettext} message catalogue
|
||||
Such a file might have other locations too, for instance a data
|
||||
directory for auxiliary files, or @code{localedir} if the module has
|
||||
its own @code{gettext} message catalogue
|
||||
(@pxref{Internationalization}).
|
||||
|
||||
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
|
||||
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
|
||||
modules can be found in @code{%load-path} (@pxref{Build Config}).
|
||||
Presently it's left up to the system administrator or each user to
|
||||
augment that path when installing Guile modules in non-default
|
||||
locations. But having reached the Scheme code, that code should take
|
||||
care of hitting any of its own private files etc.
|
||||
It will be noted all of the above requires that the Scheme code to be
|
||||
found in @code{%load-path} (@pxref{Build Config}). Presently it's
|
||||
left up to the system administrator or each user to augment that path
|
||||
when installing Guile modules in non-default locations. But having
|
||||
reached the Scheme code, that code should take care of hitting any of
|
||||
its own private files etc.
|
||||
|
||||
Presently there's no convention for having a Guile version number in
|
||||
module C code filenames or directories. This is primarily because
|
||||
|
|
|
@ -140,7 +140,7 @@ signal handlers.
|
|||
|
||||
@deffn {Scheme Procedure} 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
|
||||
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
|
||||
|
@ -150,7 +150,7 @@ arguments; for the third, call it with @var{data}.
|
|||
|
||||
@deffn {Scheme Procedure} 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
|
||||
Call @var{proc} and unblock the execution of system asyncs by one
|
||||
level for the current thread while it is running. Return the value
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
@c essay @ifinfo
|
||||
@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 this manual provided the copyright notice and this permission notice
|
||||
|
@ -52,7 +52,7 @@
|
|||
@c essay @sp 10
|
||||
@c essay @comment The title is printed in a large font.
|
||||
@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 @author Jim Blandy
|
||||
@c essay @author Free Software Foundation
|
||||
|
@ -61,7 +61,7 @@
|
|||
@c essay @page
|
||||
@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 this manual provided the copyright notice and this permission notice
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@center Version 1.2, November 2002
|
||||
|
||||
@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
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
|
|
|
@ -467,7 +467,7 @@ You can get the version number by invoking the command
|
|||
@example
|
||||
$ guile --version
|
||||
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;
|
||||
certain other uses are permitted as well. For details, see the file
|
||||
`COPYING', which is included in the Guile distribution.
|
||||
|
|
|
@ -474,36 +474,49 @@ If @var{size} is omitted, a default size will be used.
|
|||
|
||||
@deffn {Scheme Procedure} fcntl object cmd [value]
|
||||
@deffnx {C Function} scm_fcntl (object, cmd, value)
|
||||
Apply @var{command} to the specified file descriptor or the underlying
|
||||
file descriptor of the specified port. @var{value} is an optional
|
||||
integer argument.
|
||||
Apply @var{cmd} on @var{object}, either a port or file descriptor.
|
||||
The @var{value} is an integer argument, for the @code{SET} commands.
|
||||
|
||||
Values for @var{command} are:
|
||||
Values for @var{cmd} are:
|
||||
|
||||
@defvar F_DUPFD
|
||||
Duplicate a file descriptor
|
||||
Duplicate the file descriptor, the same as @code{dup->fdes} above
|
||||
does.
|
||||
@end defvar
|
||||
|
||||
@defvar F_GETFD
|
||||
Get flags associated with the file descriptor.
|
||||
@end defvar
|
||||
@defvar F_SETFD
|
||||
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
|
||||
@defvarx F_SETFD
|
||||
Get or set flags associated with the file descriptor. The only flag
|
||||
is the following,
|
||||
|
||||
@defvar FD_CLOEXEC
|
||||
The value used to indicate the ``close on exec'' flag with @code{F_GETFL} or
|
||||
@code{F_SETFL}.
|
||||
``Close on exec'', meaning the file descriptor will be closed on an
|
||||
@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 deffn
|
||||
|
||||
|
@ -2789,8 +2802,9 @@ The return value is unspecified.
|
|||
@deffnx {C Function} scm_accept (sock)
|
||||
Accept a connection from socket port @var{sock} which has been enabled
|
||||
for listening with @code{listen} above. If there are no incoming
|
||||
connections in the queue, wait until one is available (unless the
|
||||
non-blocking option has been set on the socket).
|
||||
connections in the queue, wait until one is available (unless
|
||||
@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,
|
||||
connected and ready to communicate. The @code{cdr} is a socket
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 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.
|
||||
##
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
@page
|
||||
@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
|
||||
this manual provided the copyright notice and this permission notice
|
||||
|
@ -60,7 +60,7 @@ by the author.
|
|||
@ifinfo
|
||||
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
|
||||
this manual provided the copyright notice and this permission notice
|
||||
|
|
|
@ -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>
|
||||
|
||||
* 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>
|
||||
|
||||
* readline.c: Use scm_current_input_port instead of scm_cur_inp.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 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.
|
||||
##
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;;; 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
|
||||
;;;; 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.
|
||||
|
||||
(if (not (provided? 'readline))
|
||||
(load-extension "libguilereadline-v-16" "scm_init_readline"))
|
||||
(load-extension "libguilereadline-v-17" "scm_init_readline"))
|
||||
|
||||
(if (not (provided? 'readline))
|
||||
(scm-error 'misc-error
|
||||
|
@ -216,3 +216,27 @@
|
|||
(set-readline-prompt! "" "")
|
||||
(set-readline-read-hook! #f)))))
|
||||
(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))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 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.
|
||||
##
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define SCM_SRFI_1_H
|
||||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define SCM_SRFI_14_H
|
||||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU General Public License as
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define SCM_SRFI_SRFI_4_H
|
||||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* 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
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; modify it under the terms of the GNU Lesser General Public
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue