1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 01:42:24 +02:00
Commit graph

151 commits

Author SHA1 Message Date
Jim Blandy
9630e974d2 * boot-9.scm, debug.scm, expect.scm, hcons.scm, lineio.scm,
r4rs.scm, slib.scm, threads.scm: Update copyright years.
1998-10-19 21:23:31 +00:00
Jim Blandy
9aca88c39a * boot-9.scm: Don't assume that this file is loaded just before
entering a read-eval-print loop.  Turn code to load (ice-9 emacs)
into...
(load-emacs-interface): New function.
(top-repl): Call it, if use-emacs-interface is defined and true.
At this point, we *do* know we're about to enter a REPL.
1998-10-19 13:49:29 +00:00
Mikael Djurfeldt
c8f11b9756 * boot-9.scm: Added extended read syntax for byte vectors #y(...)
and short vectors #h(...).
1998-10-18 12:41:43 +00:00
Jim Blandy
bf7bc911dd * boot-9.scm (read-path-list-notation-warning): New function:
print a warning the first time we see `#/' notation.
1998-10-09 15:12:51 +00:00
Mikael Djurfeldt
45456413b8 * boot-9.scm (make-options): Bugfix: Changed pair? --> list? in
order to allow the empty list as arg.
(error-catching-loop): Use `with-traps' to create a dynamic
context with traps enabled.
1998-08-21 08:06:03 +00:00
Mikael Djurfeldt
5ef4ef4e18 * boot-9.scm: Removed (ice-9 regex) from use-list of (guile)
module.
(try-using-libtool-name): Removed dependency on (ice-9 regex).
1998-08-19 13:10:26 +00:00
Mikael Djurfeldt
325f42e0de * boot-9.scm: Make the root module use (ice-9 regex) if
available.  The dynamic linking facilities in boot-9.scm are
currently dependent upon regular expressions.  My change of
1998-07-14 removed (ice-9 regex) from the use-list of the root
module and thereby destroyed dynamic linking.
1998-08-15 09:16:43 +00:00
Mikael Djurfeldt
a0cc0a0125 * boot-9.scm (export, export-syntax): New special forms: Export
bindings from a module.  `(export name1 name2 ...)' can be used at
the top of a module (after `define-module') to specify which names
should be exported.  It can be used as an alternative to
`define-public'.  `export-syntax' works equivalently to `export'
but is intended for export of syntactic keywords.
(Thanks to Thien-Thi Nguyen.)
1998-07-15 23:01:45 +00:00
Mikael Djurfeldt
39bc994824 * boot-9.scm: Renamed module (guile-repl)' --> (guile-user)'. 1998-07-15 19:32:13 +00:00
Mikael Djurfeldt
ae996c08a0 * boot-9.scm: Let the user start in module `(guile-repl)' instead
of module `(guile)'.  Also make sure that `(guile-repl)' uses
suitable modules.  This change improves Guile stability
substantially since bindings will only be copied from the root
module: If the user redefines builtins in `(guile-repl)' it won't
affect the internal operation of Guile itself.
1998-07-14 22:48:00 +00:00
Mikael Djurfeldt
13e341bb4d * boot-9.scm: Let the user start in module `(user)' instead of
module `(guile)'.  Also make sure that `(user)' uses suitable
modules.  This change improves Guile stability substantially since
bindings will only be copied from the root module: If the user
redefines builtins in `(user)' it won't affect the internal
operation of Guile itself.
1998-07-14 10:23:40 +00:00
Mikael Djurfeldt
c6775c407a * boot-9.scm (load-module): When loading files from within files
themselves being loaded: Use the directory path of the file being
loaded as root for relative filenames.  (After suggestion by
Steven G. Johnson.)
1998-06-18 23:59:24 +00:00
Mikael Djurfeldt
279ba8c035 * boot-9.scm: Check that (current-input-port) is a tty before
enabling readline.  (Thanks to Michael N. Livshin.)
1998-06-09 21:56:51 +00:00
Mikael Djurfeldt
cf26610900 * boot-9.scm (use-syntax): Turned into a macro inorder to be
similar in use to `use-modules'.
Example: (use-syntax (ice-9 syncase)) will 1. load the module
(ice-9 syncase), and, 2. install the procedure `syncase' as eval
transformer.
(internal-use-syntax): New procedure.
(process-define-module): Use `internal-use-syntax'.
1998-06-07 10:29:40 +00:00
Mikael Djurfeldt
dc5c203863 * boot-9.scm: Antirevert Jim's readline code which he reverted
19971027 and adapt it to the current readline interface.

* boot-9.scm (top-repl): Only enable readline if not using the
Emacs interface; Only use repl prompt when using the readline port
from repl-read.  (We don't want to see it when calling `read'.)

* boot-9.scm (remove-hook!): Parenthesis bug.
1998-05-12 23:59:21 +00:00
Mikael Djurfeldt
f246e585bb * boot-9.scm: Load readline module if readline is present.
* readline.scm (apropos-completion-function): New procedure:
Symbolic completion.  (Thanks to Andrew Archibald!)
1998-05-11 01:15:26 +00:00
Mikael Djurfeldt
f714ca8e67 * boot-9.scm (process-define-module): Added keyword use-syntax. 1998-05-04 11:44:13 +00:00
Mikael Djurfeldt
16b8ebbe81 * boot-9.scm: Added new run-time option interface eval-options. 1998-03-30 21:07:52 +00:00
Mikael Djurfeldt
abf06c1273 * boot-9.scm (remove-hook!): New macro. (Thanks to Maciej
Stachowiak.)
1998-03-28 10:30:40 +00:00
Jim Blandy
0543c9b780 Fixed copyright notice on complex transcendental functions. Jerry
Hedden assigned the copyright to the FSF a while ago.
1998-01-05 22:10:10 +00:00
Tim Pierce
249cdba61b Changes for SLIB compatibility. 1997-12-26 02:59:08 +00:00
Tim Pierce
848f2a0114 boot-9.scm (read-line): Rewritten to use %read-line.
ioext.c (%read-line): Return a cons of the input line and its terminator.
fports.c, genio.c, genio.h, ports.c, ports.h: Change fgets methods
	to return the string length as well as its contents.
1997-12-13 08:33:33 +00:00
Mikael Djurfeldt
8bb7f6466b * boot-9.scm (error-catching-loop, save-stack): `the-last-stack'
is now a fluid.
1997-11-29 01:11:21 +00:00
Tim Pierce
ebd79f623f Libtool support for find-and-link-dynamic-module 1997-11-28 17:22:20 +00:00
Gary Houston
28d8ab3c69 * boot-9.scm (set-batch-mode?!, batch-mode?): initialize more
usefully so they will work from a script.
1997-11-09 23:36:17 +00:00
Marius Vollmer
cf8f1a90f9 * boot-9.scm (inherit-print-state): Moved definition to the
neighborhood of the record code.
1997-10-31 22:16:24 +00:00
Jim Blandy
483f0ecb10 * boot-9.scm: Revert changes to this file from Oct 23. It turns
out to interact badly with the Emacs support and the Tcl/Tk
support.  It's not a high enough priority at the moment to be
worth fixing.  I'm leaving the other readline support in, though.
1997-10-27 07:07:03 +00:00
Jim Blandy
a3cd2b988f Add support for readline function.
* readline.scm: New module.
* boot-9.scm (repl-reader): New function.
(scm-style-repl): Call repl-reader, instead of doing the reading
ourselves.  Remove repl-report-reset; it was never used for
anything.
(top-repl): If we've got the readline primitives, then redefine
repl-reader to use them.
If we've got the readline primitives, import the readline module.
1997-10-23 05:00:55 +00:00
Gary Houston
4bbbcd5c42 * expect.scm: (expect-regexec): new procedure, use it in
expect-strings to fix the => syntax under the new regex system.
	(top): include regex module in define-module statement.
	* (error-catching-loop): new local variable "interactive".  if
	#f, abort terminates the process.
	(set-batch-mode?!, batch-mode?): new closures, defined in
	error-catching-loop.  the names are from scsh.
1997-10-11 20:42:24 +00:00
Marius Vollmer
1c11d900c0 * boot-9.scm (inherit-print-state): If NEW-PORT contains a
print-state, throw it away.
1997-10-06 13:19:47 +00:00
Mikael Djurfeldt
9f9aa47baf 1997-10-03 Mikael Djurfeldt <mdj@nada.kth.se>
* boot-9.scm (struct-layout): Use `vtable-index-layout' instead of
	`0'.

1997-10-02  Mikael Djurfeldt  <mdj@nada.kth.se>

	* boot-9.scm (struct-printer, make-struct-printer,
	set-struct-printer-in-vtable!, *struct-printer*): Removed.
	(record-type-vtable, make-record-type): Don't use make-struct-printer.
	(record-type-vtable): User fields "prpr" (printer is no longer a
	user field).
	(record-type-name, record-type-fields): Decreased slot index by
	one; Use `vtable-offset-user'.
1997-10-03 00:47:48 +00:00
Marius Vollmer
ae335672cb * boot-9.scm (inherit-print-state): New experimental function. 1997-10-02 14:23:50 +00:00
Jim Blandy
a6401ee0f2 Suggestion and script from Maciej Stachowiak:
* boot-9.scm: Split off modules into separate, autoloadable files.
This reduces startup time from 10.5s to 5.5s (user cpu).
* calling.scm, common-list.scm, ls.scm, q.scm, runq.scm,
string-fun.scm: New files, containing stuff that used to be in
boot-9.scm.
* Makefile.am (ice9_sources): List new files here, for
distribution and installation.
* Makefile.in: Regenerated.
1997-09-30 17:16:54 +00:00
Mikael Djurfeldt
2f110c3ce3 * boot-9.scm: Bugfix: Hard-solder the print-option procedure into
the make-options macro so that we needn't refer to a global
symbol.
1997-09-29 01:23:59 +00:00
Mikael Djurfeldt
83b381985d * debug.scm: Moved options interface procedures to boot-9.scm.
* boot-9.scm: Define options interface procedures here instead.
1997-09-28 20:12:17 +00:00
Jim Blandy
af01fdcd21 * boot-9.scm (separate-fields-discarding-char,
separate-fields-after-char, separate-fields-before-char): Call
continuation function, RET, as advertised: with each separated
field a separate argument.

* Makefile.in: Regenerated with automake 1.2a.
1997-09-28 03:09:59 +00:00
Mikael Djurfeldt
534a00990b * slib.scm (slib:load): Export.
* boot-9.scm (in-vicinity): Bugfix: Don't add "/" to an empty
vicinity;
Provide defmacro.
1997-09-20 13:57:22 +00:00
Mikael Djurfeldt
a4f9b1f613 * boot-9.scm (try-module-linked): Try to find module among those already
registered.
(try-module-dynamic-link): Removed the first test which
corresponds to a call to `try-module-linked'.
(resolve-module): Resolve modules in this order: 1. Already
registered modules (for example those which have been statically
linked), 2. Try to autoload an .scm-file, 3. Try to dynamically
link a .so-file.
1997-09-16 21:31:19 +00:00
Mikael Djurfeldt
0a54457d78 * boot-9.scm (keyword->symbol, display-usage-report): Changed
length --> string-length.  (Thanks to Aleksandar Bakic.)
(separate-fields-discarding-char, separate-fields-after-char,
separate-fields-before-char): Bugfix from Maciej Stachowiak
<mstachow@mit.edu>.  Thanks!
1997-09-16 20:35:15 +00:00
Mikael Djurfeldt
11b0526116 * boot-9.scm (keyword->symbol, display-usage-report): Changed
length --> string-length.
1997-09-16 20:16:57 +00:00
Mikael Djurfeldt
24b2aac77c * boot-9.scm (iota): Renamed list-reverse! --> reverse! 1997-09-15 21:43:41 +00:00
Mikael Djurfeldt
7a0ff2f807 * * boot-9.scm (primitive-macro?): New procedure.
* slib.scm: Added hack which transfers syntactic information from
	the builtin variable `define' to the slib version if module (ice-9
	syncase) has been loaded.  This is necessary to get correct
	expansion inside the slib module.

	* psyntax.ss (build-let, build-named-let): New output
	constructors.
	(build-lexical-var): Seed gensym with symbolic name.
	(self-evaluating?): Add keywords among self-evaluating types.
	(let): New core form.
	(if): Removed from core language.
	(or, and, let, cond): Removed syntactic definitions.
	(sc-expand3): New procedure: Expander which takes optional mode
	and eval-syntactic-expanders-when arguments.

	* syncase.scm (psyncomp): New procedure: Recompiles psyntax.pp.
	Should be used inside the (ice-9 syncase) module with (use-syntax
	syncase) and with the current directory containing the psyntax.ss
	source.
	Added hack to transfer syntactic information from the builtin
	variable `define' to the slib version if module (ice-9 slib) has
	been loaded.
1997-09-10 20:07:04 +00:00
Mikael Djurfeldt
d43f8c9708 * emacs.scm (emacs-load): Added new parameter `module'.
* syncase.scm (putprop, getprop): Modified to use the object
properties of the variable object corresponding to the symbol;
This way we can ride on the mechanisms of the module system.
Changed `builtin-variable' calls to `define-public' calls.
Setup the hooks sc-expand and sc-interface.

* boot-9.scm (sc-interface, sc-expand): New builtin variables.
(set-current-module): Switch to and from sc-expand as
scm:eval-transformer when going into and out of modules using
syncase macros.
(module-use!): Set scm:eval-transformer to sc-expand when adding
the syncase interface.
1997-09-05 01:21:02 +00:00
Mikael Djurfeldt
e672f1b55a * boot-9.scm (gensym): Removed (replaced by primitive).
(obarray-gensym): Rewritten to use `gensym'.
(gentemp): Rewritten to use `gensym'.
1997-09-01 22:27:58 +00:00
Gary Houston
6afcd3b2b6 * stime.h: prototype for scm_times.
* stime.c (scm_times): new procedure.
* ioext.c (scm_fseek): if the first argument is a file descriptor
call lseek.
(scm_ftell): if the first argument is a file descriptor call lseek
(sic).
* filesys.h: prototypes for scm_open_fdes, scm_fsync.
* filesys.c (scm_chmod): if the first argument is a file descriptor,
call fchmod.
(scm_chown): if the first argument is a port or file descriptor,
call fchown.
(scm_truncate_file): new procedure.
Add DEFER/ALLOW INTS to a few other procedures.
(scm_fsync): new procedure.
(scm_open_fdes): new procedure.
(scm_open): use scm_open_fdes.  If mode isn't specified, 666 will
now be used.
(scm_fcntl): the first argument can now be a file descriptor.  The
third argument is now optional.

* posix.c (scm_execl, scm_execlp): make the filename argument
compulsory, since omitting it causes SEGV.
(scm_sync): return unspecified instead of #f.
(scm_execle): new procedure.
(environ_list_to_c): new procedure.
(scm_environ): use environ_list_to_c.  disable interrupts.
(scm_convert_exec_args): take pos and subr arguments and
improve error checking.

* boot-9.scm: define tms accessors: clock, utime, stime, cutime,
cstime.
1997-08-16 18:48:44 +00:00
Mikael Djurfeldt
096d5f90c3 * slib.scm (slib:load): Use load-from-path instead of
primitive-load-path so that backtraces get narrowed properly at
the top.

* boot-9.scm (top-repl): Save stack already in signal handler in
order to narrow it correctly.
(save-stack): Adjust narrowing tag for the top of load-stacks.
1997-08-14 18:24:46 +00:00
Gary Houston
7a6f1ffa10 * ioext.h: fix up prototypes.
* ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
Scheme name is now dup->fdes.
(scm_dup_to_fdes): make the second argument optional and
fold in the functionality of scm_primitive_dup.
(scm_primitive_dup): deleted.
* fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
* fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
ultrix are defined.  Use setvbuf instead of setbuf.
(scm_setvbuf): new procedure.
(scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
(scm_setfileno): moved from ioext.c.
(scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
(top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.

* boot-9.scm (move->fdes, dup->port): use dup->fdes, not primitive-dup.
(dup->fdes): deleted, now done in C.
1997-07-29 02:21:08 +00:00
Gary Houston
956055a9d6 * boot-9.scm (setenv): new procedure, scsh compatible. 1997-07-26 20:37:05 +00:00
Marius Vollmer
8a6a86714b * boot-9.scm (with-fluids): New macro to go with the
builtin `with-fluids*'.
1997-07-26 20:03:23 +00:00
Mikael Djurfeldt
8309a10d87 * boot-9.scm: If using emacs interface, enable backtraces
automatically.
1997-07-23 18:15:37 +00:00