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

1206 commits

Author SHA1 Message Date
Brian Templeton
c2eb58825c lexical function binding for elisp
* module/language/elisp/compile-tree-il.scm (access-variable)
  (reference-variable, set-variable!): Handle globally-bound non-special
  variables.

  (bind-lexically?): Create lexical bindings for flet and flet*.

* module/language/elisp/runtime.scm (reference-variable, set-variable!):
  Handle globally-bound non-special variables.

  (built-in-func): Set the variable directly instead of storing the
  function in a fluid.

* module/language/elisp/runtime/subrs.scm (funcall): Call apply
  directly.

* test-suite/tests/elisp-compiler.test ("Function Definitions")["flet
  and flet*"]:
2010-08-16 03:20:55 -04:00
Brian Templeton
761e60535b use unbound fluids instead of `void' sentinel value
* module/language/elisp/compile-tree-il.scm (reference-with-check)
  (compile-without-void-checks, want-void-check?): Remove.

  (compile-function, compile-pair): Use `reference-variable' instead of
  `reference-with-check'.

  (compile-defvar): Only set `sym' if `sym' is not bound to a bound
  fluid, rather than requiring that its value be `void'.

  (process-options!): Remove `#:disable-void-check' option handling.

* module/language/elisp/runtime.scm (void)
  (reference-variable-with-check): Remove.

  (ensure-fluid!): Use an undefined fluid as the initial value for
  global variables.

* module/language/elisp/runtime/function-slot.scm (without-void-checks):
  Don't import or re-export.

* module/language/elisp/runtime/macros.scm (prog1, cond, or, dolist):
  Don't use `without-void-checks'.

* module/language/elisp/runtime/subrs.scm (symbol-value)
  (symbol-function, apply): Use `reference-variable' instead of
  `reference-variable-with-check'.

  (makunbound, fmakunbound, boundp, fboundp): Unset the variable's fluid
  (or the variable itself, if it isn't bound to a fluid).

* test-suite/tests/elisp-compiler.test ("Variable
  Setting/Referencing")["disabled void check (all)", "disabled void
  check (symbol list)", "without-void-checks"]: Remove.
2010-08-15 23:31:41 -04:00
Brian Templeton
5cfb903459 function's argument can be a symbol
* module/language/elisp/compile-tree-il.scm (compile-function): the form
  `(function SYMBOL)' evaluates to the functional value of SYMBOL
2010-08-15 23:02:56 -04:00
Brian Templeton
c9cd4ae8c1 allow (setcar nil nil)' and (setcdr nil nil)'
* module/language/elisp/runtime/subrs.scm (setcar, setcdr): Allow
  setting the car or cdr of `nil' to `nil'.
2010-08-15 23:02:56 -04:00
Brian Templeton
1a7bb9aa94 support "#'" syntax for function expressions
* module/language/elisp/lexer.scm (lex):
* module/language/elisp/parser.scm (get-expression): Support sharpsign
  single-quote syntax as an abbreviation for `function' expressions.
2010-08-15 23:02:56 -04:00
Brian Templeton
718acc97e6 autoload compile-file in (guile-user)
* module/ice-9/boot-9.scm (guile-user): Autoload `compile-file'.
2010-08-13 16:35:51 -04:00
Brian Templeton
3cb34c5c04 add .dir-locals for elisp
* module/language/elisp/.dir-locals.el: New file. Set fill-column to 72.
2010-08-13 16:35:51 -04:00
Brian Templeton
46ab7225d5 setq can take any number of arguments
* module/language/elisp/compile-tree-il.scm (compile-setq): Return nil
  if called with no arguments, and set the last variable to nil if its
  value is omitted.
2010-08-13 16:35:51 -04:00
Brian Templeton
3b93c9b881 use correct names for quasiquotation operators
Use #{`}#, #{,}# and #{,@}# as the quasiquote, unquote and
unquote-splicing operators, respectively. Previously they were named
escaping.

* module/language/elisp/compile-tree-il.scm (unquote?): Change "\," to
  "#{,}#".
  (unquote-splicing): Change "\,@" to "#{,@}#".
  (#{compile-`}#): Rename from #{compile-\`}#.
* module/language/elisp/runtime/function-slot.scm: Import #{compile-`}#
  instead of #{compile-\`}#, and re-export as #{`}# instead of as
  #{\`}#.
* module/language/elisp/parser.scm (quotation-symbols):
* test-suite/tests/elisp-compiler.test ("Eval", "Quotation"):
* test-suite/tests/elisp-reader.test ("Parser"): Change "\`", "\,", and
  "\,@" to "#{`}#", "#{,}#" and "#{,@}#", respectively.
2010-08-13 16:35:51 -04:00
Brian Templeton
7d6816f0c7 store special operators in the function slot
If the function slot of a symbol contains a pair with `special-operator'
in the car and a procedure in the cdr, the procedure is called to
compile the form to Tree-IL. This is similar to other Emacs Lisp
implementations, in which special operators are subrs.

* module/language/elisp/compile-tree-il.scm: Restructured to store
  special operator definitions in the function slot. Import `(language
  elisp runtime)' for `defspecial'. Export special operators so that
  `(language elisp runtime function-slot)' can re-export them.

  (backquote?): Removed; the backquote symbol is defined as a special
  operator, so it's no longer used in `compile-pair'.

  (is-macro?, get-macro): Replaced by `find-operator'.
  (find-operator): New procedure.

  (compile-progn, compile-if, compile-defconst, compile-defvar,
  compile-setq, compile-let, compile-lexical-let, compile-flet,
  compile-let*, compile-lexical-let*, compile-flet*,
  compile-without-void-checks, compile-with-always-lexical,
  compile-guile-ref, compile-guile-primitive, compile-while,
  compile-function, compile-defmacro, compile-defun, #{compile-`}#,
  compile-quote): New special operators with definitions taken from the
  pmatch form in `compile-pair'. There is no special operator `lambda';
  it is now a macro, as in other Elisp implementations.

  (compile-pair): Instead of directly compiling special forms, check for
  a special operator object in the function slot.

* module/language/elisp/runtime.scm: Export `defspecial'.
  (make-id): New function.
  (built-in-macro): Prefix macros with `macro-'.
  (defspecial): New syntax.

* module/language/elisp/runtime/function-slot.scm: Import and re-export
  special operators. Rename imported special operators and macros to
  remove prefixes. Re-export new macro `lambda'.

* module/language/elisp/runtime/macros.scm (macro-lambda): New Elisp
  macro.
2010-08-13 16:35:51 -04:00
Brian Templeton
ff16217c10 make user-defined macros available at runtime
* module/language/elisp/compile-tree-il.scm (ensuring-globals): New
  procedure.
  (define-macro!): Remove.
  (compile-pair) <defmacro>: Make macro available at runtime, not only
  during compilation.
  (compile-tree-il): Use `ensuring-globals'.
2010-08-13 16:35:51 -04:00
Brian Templeton
faf160ff1a allow fluid macro bindings
* module/language/elisp/compile-tree-il.scm (define-macro!, get-macro):
  Allow fluid macro bindings.
2010-08-13 16:35:51 -04:00
Brian Templeton
e322a02bc1 new `load' subr
* module/language/elisp/runtime/subrs.scm: Define new subr `load'.
* module/language/elisp/runtime/function-slot.scm: Re-export `load'.
2010-08-13 16:35:51 -04:00
Brian Templeton
f12492fa98 Ignore #:warnings compiler option
* module/language/elisp/compile-tree-il.scm (process-options!): Ignore
  #:warnings compiler option.
2010-08-13 16:35:51 -04:00
Brian Templeton
c8ed3e7cef handle EOF correctly in parser and lexer
* module/language/elisp/lexer.scm (lex, get-lexer/1): Return a valid
  token at EOF.
* module/language/elisp/parser.scm (get-expression): Raise an error if
  EOF is reached.
  (read-elisp): If at EOF, return the EOF object instead of attempting
  to read an expression.
2010-08-13 16:35:51 -04:00
Brian Templeton
258914f320 add new elisp files to module/Makefile.am 2010-08-13 16:35:51 -04:00
Brian Templeton
c55a2ddc1b store macro definitions in the function slot
Guile Emacs Lisp previously kept macros in a separate macro slot; now
macros are stored as macro objects in the function slot for
compatibility with other implementations.

* module/language/elisp/compile-tree-il.scm (macro-slot): Remove.
  (is-macro?): Check that the argument is a symbol. Now-unnecessary
  check removed in `compile-tree-il'.
  (macro?, define-macro!, get-macro): Store macro definitions in the
  function slot, not in a separate macro slot.
* module/language/elisp/runtime.scm (built-in-macro): Wrap the macro
  function in a macro object (i.e., cons the symbol `macro' onto it).
* module/language/elisp/runtime/function-slot.scm: Move contents to
  "subrs.scm". Re-export function and macro definitions instead of
  defining functions directly in this module.
* module/language/elisp/runtime/macro-slot.scm: Move contents to
  "macros.scm" and remove.
* module/language/elisp/runtime/macros.scm: New file containing macro
  definitions from "macro-slot.scm".
* module/language/elisp/runtime/subrs.scm: New file containing function
  definitions from "function-slot.scm".
2010-08-13 16:35:51 -04:00
Brian Templeton
88698140c0 use existing bindings record for defmacro
* module/language/elisp/compile-tree-il.scm (compile-pair): Use existing
  bindings record during macro definition.
2010-08-13 16:35:51 -04:00
Brian Templeton
e609a73399 use tree-il's support for optional arguments
* module/language/elisp/compile-tree-il.scm (compile-lambda): Use
  Tree-IL's support for optional arguments.
  (process-optionals, process-rest): Remove.
2010-08-13 16:35:51 -04:00
Brian Templeton
ae20bb4eee reindent
* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm:
* module/language/elisp/spec.scm: Reindent.
2010-08-13 16:35:50 -04:00
Brian Templeton
27b9476a8d reformat comments
* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm:
* module/language/elisp/runtime/value-slot.scm: Reformat comments.
2010-08-13 16:35:50 -04:00
Brian Templeton
372b11fc73 whitespace changes
* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm: Ensure that all
  top-level forms and comments are separated by exactly one newline.
  Remove blank lines in most procedure bodies. Delete trailing
  whitespace.
2010-08-13 16:35:50 -04:00
Julian Graham
802b47bdc6 Explicit definitions for memp' and assp' in `(rnrs list)'; the predicate
argument to Guile's `member' and `assoc' functions has a different expected
arity.

* module/rnrs/lists.scm (memp, assp): Wrap the predicate function with a
  two-argument wrapper before calling Guile's underlying implemenation.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-lists.test to
  SCM_TESTS.
* test-suite/tests/r6rs-lists.test: New file.
2010-08-08 20:23:14 -04:00
Julian Graham
b24b7deb00 Explicit definitions for vector-for-each' and vector-map'; Guile's SRFI-1
`for-each' and `map' implementations do not operate on lists and vectors
interchangeably.

* module/rnrs/base.scm (vector-for-each, vector-map): New functions.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-base.test to SCM_TESTS.
* test-suite/tests/r6rs-base.test: New file.
2010-08-08 19:32:23 -04:00
Andy Wingo
3d4f8e3c2d fix stack narrowing for tail-call to throw
* module/system/repl/debug.scm (narrow-stack->vector): Fix for the
  tail-call to `throw' case, as in `(quit)'.
2010-08-06 17:39:51 +02:00
Andy Wingo
5bc97ad5dd ,x unbound does not quit repl
* module/system/repl/repl.scm (run-repl): Catch errors executing
  metacommands. Feature on top of feature...
2010-08-06 17:28:10 +02:00
Andy Wingo
935c7acac7 letrec* in docs, and some r6rs fixes
* doc/ref/api-binding.texi: Add docs for letrec*, and revise some other
  text.
* doc/ref/compiler.texi: Update <letrec> for in-order?.
* doc/ref/r6rs.texi: Add letrec* entry.

* module/rnrs.scm:
* module/rnrs/base.scm: Export letrec*.
2010-08-06 11:52:27 +02:00
Ludovic Courtès
7387c231ee Fix `parse-c-struct'.
* module/system/foreign.scm (parse-c-struct): Update use of
  `pointer->bytevector' to the new API.

* test-suite/tests/foreign.test ("structs"): New test prefix.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
183a2a224b Update the FFI doc.
* doc/ref/api-foreign.texi (Foreign Types): Remove bits about typed
  foreign pointers.  Add `void'.
  (Foreign Variables): Update the doc of `dynamic-pointer' and the
  `numptob' example.  Remove `foreign-set!' and `foreign-ref'.  Add
  `pointer-address', `make-pointer', `%null-pointer', and
  `null-pointer?'
  (Void Pointers and Byte Access): Make it clear that wrapped pointers
  are untyped.  Remove `void' from here.  Replace `foreign->bytevector'
  and `bytevector->foreign' by `pointer->bytevector' and
  `bytevector->pointer'.  Add `dereference-pointer' and the rest of the
  `numptob' example.
  (Dynamic FFI): Update examples.  Remove `%null-pointer' from here.

* libguile/dynl.c (scm_dynamic_pointer): Update docstring.

* libguile/foreign.c (scm_dereference_pointer,
  scm_pointer_to_bytevector): Likewise.

* module/system/foreign.scm (null-pointer?): Add docstring.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
5b46a8c2c8 Use "pointer" instead of "foreign" when dealing with wrapped pointers.
* libguile/foreign.h (scm_t_foreign_finalizer): Rename to...
  (scm_t_pointer_finalizer): ... this.
  (SCM_FOREIGN_P): Rename to...
  (SCM_POINTER_P): this.
  (SCM_VALIDATE_FOREIGN): Rename to...
  (SCM_VALIDATE_POINTER): ... this.
  (SCM_FOREIGN_HAS_FINALIZER): Rename to...
  (SCM_POINTER_HAS_FINALIZER): ... this.
  (scm_take_foreign_pointer): Rename to...
  (scm_from_pointer): ... this.
  (scm_foreign_address): Rename to...
  (scm_pointer_address): ... this.
  (scm_foreign_to_bytevector): Rename to...
  (scm_pointer_to_bytevector): ... this.
  (scm_foreign_set_finalizer_x): Rename to...
  (scm_set_pointer_finalizer_x): ... this.
  (scm_bytevector_to_foreign): Rename to...
  (scm_bytevector_to_pointer): ... this.
  (scm_i_foreign_print): Rename to...
  (scm_i_pointer_print): ... this.

* libguile/foreign.c: Update accordingly.

* libguile/tags.h (scm_tc7_foreign): Rename to...
  (scm_tc7_pointer): ... this.

* libguile/foreign.c, libguile/deprecated.c, libguile/dynl.c,
  libguile/evalext.c, libguile/gc.c, libguile/goops.c, libguile/gsubr.c,
  libguile/gsubr.h, libguile/print.c, libguile/snarf.h,
  libguile/vm-i-system.c, module/system/foreign.scm,
  test-suite/standalone/test-ffi, test-suite/tests/foreign.test: Update
  accordingly.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
17fc9efecb Add dereference-pointer' to (system foreign)'.
* libguile/foreign.c (scm_dereference_pointer): New function.

* libguile/foreign.h (scm_dereference_pointer): New declaration.

* module/system/foreign.scm (dereference-pointer): Likewise.

* test-suite/tests/foreign.test
  ("foreign<->bytevector")["dereference-pointer"]: New test.
2010-07-26 19:38:52 +02:00
Ludovic Courtès
d4149a510e Simplify the (system foreign) API.
Suggested by Neil Jerram.

* libguile/foreign.h (SCM_FOREIGN_TYPE, SCM_FOREIGN_VALUE_REF,
  SCM_FOREIGN_VALUE_SET, SCM_FOREIGN_LEN, SCM_FOREIGN_TYPED_P,
  SCM_FOREIGN_VALUE_P, SCM_VALIDATE_FOREIGN_VALUE, scm_foreign_set_x,
  scm_foreign_type): Remove.
  (scm_foreign_ref): Rename to...
  (scm_foreign_address): ... this.
  (scm_take_foreign_pointer): Update.
  (SCM_FOREIGN_POINTER): Remove CTYPE argument.  Update callers.
  (scm_make_pointer): New declaration.

* libguile/foreign.c (scm_to_uintptr, scm_from_uintptr): New macros.
  (scm_make_pointer): New function.
  (scm_take_foreign_pointer): Remove TYPE and LEN arguments.  Update
  callers.
  (scm_foreign_ref): Remove to...
  (scm_foreign_address): ... this.  Remove type-related code.
  (scm_foreign_set_x): Remove.
  (scm_foreign_to_bytevector): Change argument order; make LEN argument
  compulsory.
  (scm_i_foreign_print): Remove type printing.
  (unpack): Remove foreign-type checking.

* libguile/deprecated.c (scm_dynamic_args_call): Update accordingly.

* libguile/dynl.c (scm_dynamic_pointer): Remove the TYPE and LEN
  arguments; update callers.  Update to the new foreign API.

* libguile/dynl.h (scm_dynamic_pointer): Update.

* libguile/gsubr.c (create_gsubr): Update to the new foreign API.

* libguile/gsubr.h (SCM_SUBRF, SCM_SUBR_GENERIC): Ditto.

* libguile/snarf.h (SCM_IMMUTABLE_FOREIGN): Ditto.

* libguile/vm-i-system.c (subr_call): Ditto.

* module/system/foreign.scm (null-pointer?): New procedure.

* test-suite/standalone/test-ffi: Update to the new
  `bytevector->foreign' signature.

* test-suite/tests/foreign.test ("null pointer")["null pointer
  identity", "null-pointer? %null-pointer"]: New tests.
  ["foreign-set! other-null-pointer", "foreign->bytevector
  other-null-pointer"]: Remove.
  ("make-pointer", "foreign<->bytevector"): New test prefixes.
2010-07-26 19:38:52 +02:00
Ludovic Courtès
fefd60ba4b Check for go/scm mtime ordering rather than equality.
* am/guilec (install-data-hook): Remove.
  (guile_install_go_files): New variable.
  ($(guile_install_go_files)): New dependency.

* libguile/load.c (compiled_is_fresh): Check for ordering of STAT_SOURCE
  and STAT_COMPILED, not equality.

* module/ice-9/boot-9.scm (load): Ditto.

* module/system/base/compile.scm (call-with-output-file/atomic): Don't
  set the timestamp of TEMPLATE.
2010-07-26 19:38:52 +02:00
Thien-Thi Nguyen
395afce9f2 [maint] Remove unused script guile-doc-snarf.
* doc/ref/tools.texi (Doc Snarfing): Don't mention guile-doc-snarf.

* configure.ac (libguile/guile-doc-snarf): Delete ‘GUILE_CONFIG_SCRIPT’.

* libguile/Makefile.am (noinst_SCRIPTS): Remove guile-doc-snarf.
* libguile/.gitignore: Remove guile-doc-snarf.
* libguile/guile-doc-snarf.in: Delete file.

* module/scripts/doc-snarf.scm: Comment munging; nfc.

* AUTHORS: Update.
2010-07-22 21:10:38 +02:00
Ludovic Courtès
0b7f2eb8bf Start rewriting SRFI-1 in Scheme.
This partially reverts commit e556f8c3c6
(Fri May 6 2005).

* module/srfi/srfi-1.scm (xcons, list-tabulate, not-pair?, car+cdr,
  last, fold, list-index): New procedures.

* srfi/srfi-1.c (srfi1_module): New variable.
  (CACHE_VAR): New macro.
  (scm_srfi1_car_plus_cdr, scm_srfi1_fold, scm_srfi1_last,
  scm_srfi1_list_index, scm_srfi1_list_tabulate, scm_srfi1_not_pair_p,
  scm_srfi1_xcons): Rewrite as proxies of the corresponding Scheme
  procedure.

* test-suite/tests/srfi-1.test ("list-tabulate")["-1"]: Change exception
  type to `exception:wrong-type-arg'.

* benchmark-suite/benchmarks/srfi-1.bm: New file.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmarks/srfi-1.bm'.

* test-suite/standalone/Makefile.am (test_srfi_1_SOURCES,
  test_srfi_1_CFLAGS, test_srfi_1_LDADD): New variables.
  (check_PROGRAMS): Add `test-srfi-1'.
  (TESTS): Ditto.

* test-suite/standalone/test-srfi-1.c: New file.
2010-07-21 01:07:56 +02:00
Ludovic Courtès
927bf5e8cc Add vhash-fold*' in (ice-9 vlist)'.
* module/ice-9/vlist.scm (%vhash-fold*): New inline procedure.
  (vhash-fold*, vhash-foldq*, vhash-foldv*): New procedures.

* test-suite/tests/vlist.test ("vhash")["vhash-fold*", "vhash-fold*
  tail", "vhash-fold* interleaved", "vhash-foldq* degenerate"]: New
  tests.

* doc/ref/api-compound.texi (VHashes): Add `vhash-fold*' & co.
2010-07-21 00:28:58 +02:00
Andy Wingo
d68a81e038 recommend #:replace
* doc/ref/api-modules.texi (Creating Guile Modules): Update text to
  recommend #:replace.
* module/srfi/srfi-19.scm (current-time): #:replace.
2010-07-17 13:31:06 +02:00
Andy Wingo
2e67eb6f2d remove (system vm debug)
* module/system/vm/debug.scm: Remove.
* module/Makefile.am: Update.

* module/system/repl/debug.scm: Add some TODOs and a commented-out
  function here.
2010-07-16 17:35:43 +02:00
Andy Wingo
ca9300a255 remove (ice-9 emacs)
* module/ice-9/emacs.scm: Remove.
* module/ice-9/deprecated.scm (load-emacs-interface): Remove wrapper
  with no callers.
* module/Makefile.am: update.
2010-07-16 17:35:43 +02:00
Andy Wingo
cd8e32c5cd gut ice-9 debug
* module/ice-9/debug.scm: Gut, though we keep the module around for code
  Out There that uses it.

* module/ice-9/top-repl.scm (top-repl): Don't import (ice-9 debug)

* module/ice-9/debugger/commands.scm:
* module/ice-9/debugging/trace.scm:
* module/ice-9/emacs.scm: Remove ice-9 debug includes.
2010-07-16 17:35:43 +02:00
Andy Wingo
019fdc97d9 updates to system repl command
* module/system/repl/command.scm (help): Update docs on how to get help
  on a particular command.
  (load): Remove #:f flag.
2010-07-16 17:35:43 +02:00
Ludovic Courtès
88e41e94d3 sxml-match: Always use the same prompt tag.
* module/sxml/match.scm (%call/ec-prompt): New variable.
  (call/ec): Use it instead of creating a new prompt tag.
2010-07-15 23:12:57 +02:00
Ludovic Courtès
736aff0086 Declare `ice-9/psyntax-pp.scm.gen' as a phony target.
* module/Makefile.am (.PHONY): Add `ice-9/psyntax-pp.scm.gen'.
2010-07-15 23:12:57 +02:00
Andy Wingo
d286c8ce34 don't re-print the error by default in call-with-error-handling
* module/system/repl/error-handling.scm (call-with-error-handling):
  Previous post-error changed to "report"; now "catch", the default,
  doesn't re-print the error.
2010-07-15 12:47:58 +02:00
Andy Wingo
45f84beaf1 error-handling tweak
* module/system/repl/error-handling.scm (call-with-error-handling):
  Remove extra newline.
2010-07-15 12:46:02 +02:00
Andy Wingo
867961f979 pass a frame to display-error in system repl error-handling
* module/system/repl/error-handling.scm (call-with-error-handling): Pass
  a frame to display-error.
2010-07-15 12:13:15 +02:00
Andy Wingo
f4b879e03b fix boostrapping error with srfi-1 (for the third time!)
* module/ice-9/deprecated.scm (set-repl-prompt!): Avoid @, so as to
  avoid a bootstrapping error. Horrible.
2010-07-14 19:45:05 +02:00
Julian Graham
3fdc1d05ae Fix argument passing for external hash functions in `(rnrs hashtables)'.
Guile implements this library in terms of SRFI-69, which is a bit vague on
the arity of hash functions, whereas `(rnrs hashtables)' explicitly
specifies unary ones.

* module/rnrs/hashtables.scm (wrap-hash-function): Assume SRFI-69 will pass
  the table capacity as the second argument; return the result of proc
  modulo the capacity.

* test-suite/tests/r6rs-hashtables.test (make-hashtable): New test case for
  hash functions that return large values.
2010-07-14 01:16:19 -04:00
Andy Wingo
aa77dace40 fix psyntax-pp.go dependency
* module/Makefile.am (ice-9/psyntax-pp.go): Fix dep.
2010-07-13 10:48:19 +02:00
Andy Wingo
2f26a2266a ctrl-d with readline exits one recursive repl instance
* module/ice-9/buffered-input.scm (make-buffered-input-port): Instead of
  always returning EOF once EOF is seen once, call the producer again.
  Allows Ctrl-D to cause one EOF at the REPL, returning once from a
  recursive edit, but input continues normally. Thanks to Andrew
  Bagdanov for a clue that led to the fix.
2010-07-13 10:42:52 +02:00