guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-9-66-g54e


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-9-66-g54e53aa
Date: Fri, 09 Apr 2010 13:31:15 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=54e53aa4301bcb8aaff0a5dfd4af044ee693f235

The branch, master has been updated
       via  54e53aa4301bcb8aaff0a5dfd4af044ee693f235 (commit)
       via  7c4aad9cc7143ea7c1a7ce3c143ca0581cace5b5 (commit)
       via  c1b7c940eca528d8875bc9bd00fba1a885b4dddb (commit)
       via  92e19ec06d490a95e9550c634c922f67e42140d6 (commit)
       via  0becb8f316137e6823b2652a33b7212e02722782 (commit)
      from  01ad5a7ba9edb5d8c96567ed80ea1a34019c5338 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 54e53aa4301bcb8aaff0a5dfd4af044ee693f235
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 14:17:04 2010 +0200

    %nil -> #nil
    
    * module/language/assembly.scm (object->assembly, assembly->object):
    * module/language/elisp/compile-tree-il.scm (compile-pair):
    * module/language/glil/decompile-assembly.scm (decompile-load-program):
      Change instances of %nil to #nil.

commit 7c4aad9cc7143ea7c1a7ce3c143ca0581cace5b5
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 14:15:16 2010 +0200

    add read syntax for #nil
    
    * libguile/evalext.c (scm_self_evaluating_p): #nil is self-evaluating.
    
    * libguile/read.c (scm_read_nil, scm_read_sharp): Add read syntax for
      #nil.

commit c1b7c940eca528d8875bc9bd00fba1a885b4dddb
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 14:03:02 2010 +0200

    lisp nil always enabled
    
    * configure.ac: Remove --disable-elisp option. Lisp nil is always
      enabled.
    
    * libguile/boolean.h:
    * libguile/gen-scmconfig.c:
    * libguile/gen-scmconfig.h.in:
    * libguile/init.c:
    * libguile/lang.c:
    * libguile/lang.h:
    * libguile/pairs.h:
    * libguile/private-options.h:
    * libguile/read.c: Remove conditionals for disabling elisp.

commit 92e19ec06d490a95e9550c634c922f67e42140d6
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 13:41:31 2010 +0200

    add debugging input and output ports
    
    * module/system/vm/debug.scm (*debug-input-port*):
      (*debug-output-port*): New public fluids.
      (run-debugger): Add some kwargs for input and output ports, defaulting
      to the debug input and output ports.
      (debug-pre-unwind-handler): Print to debug output port.
      (debug): Untabify.

commit 0becb8f316137e6823b2652a33b7212e02722782
Author: Andy Wingo <address@hidden>
Date:   Fri Apr 9 13:33:20 2010 +0200

    repl-reader only prompts if no input is available
    
    * module/ice-9/boot-9.scm (repl-reader): For the default (non-readline)
      repl reader, only display the prompt if input isn't already available.
      Fixes spurious prompts in the debugger.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                |   10 -----
 libguile/boolean.h                          |   18 ++--------
 libguile/evalext.c                          |    2 +-
 libguile/gen-scmconfig.c                    |    5 ---
 libguile/gen-scmconfig.h.in                 |    1 -
 libguile/init.c                             |    2 -
 libguile/lang.c                             |    6 +---
 libguile/lang.h                             |   11 +-----
 libguile/pairs.h                            |    8 +---
 libguile/private-options.h                  |    9 -----
 libguile/read.c                             |   20 ++++++++--
 module/ice-9/boot-9.scm                     |    3 +-
 module/language/assembly.scm                |    4 +-
 module/language/elisp/compile-tree-il.scm   |    4 +-
 module/language/glil/decompile-assembly.scm |    2 +-
 module/system/vm/debug.scm                  |   50 +++++++++++++++++++++------
 16 files changed, 71 insertions(+), 84 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9203cb4..73a4bd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,10 +160,6 @@ fi
 AC_DEFINE_UNQUOTED([SCM_WARN_DEPRECATED_DEFAULT], "$warn_default",
 [Define this to control the default warning level for deprecated features.])
 
-AC_ARG_ENABLE(elisp,
-  [  --disable-elisp         omit Emacs Lisp support],,
-  enable_elisp=yes)
-
 dnl  Added the following configure option in January 2008 following
 dnl  investigation of problems with "64" system and library calls on
 dnl  Darwin (MacOS X).  The libguile code (_scm.h) assumes that if a
@@ -254,11 +250,6 @@ if test "$enable_debug_malloc" = yes; then
    AC_LIBOBJ([debug-malloc])
 fi
 
-if test "$enable_elisp" = yes; then
-  SCM_I_GSC_ENABLE_ELISP=1
-else
-  SCM_I_GSC_ENABLE_ELISP=0
-fi
 AC_CHECK_LIB(uca, __uc_get_ar_bsp)
 
 AC_C_CONST
@@ -1622,7 +1613,6 @@ AC_SUBST([sitedir])
 AC_SUBST([SCM_I_GSC_GUILE_DEBUG])
 AC_SUBST([SCM_I_GSC_ENABLE_DISCOURAGED])
 AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED])
-AC_SUBST([SCM_I_GSC_ENABLE_ELISP])
 AC_SUBST([SCM_I_GSC_STACK_GROWS_UP])
 AC_SUBST([SCM_I_GSC_C_INLINE])
 AC_CONFIG_FILES([libguile/gen-scmconfig.h])
diff --git a/libguile/boolean.h b/libguile/boolean.h
index 007500e..3e9debd 100644
--- a/libguile/boolean.h
+++ b/libguile/boolean.h
@@ -52,12 +52,8 @@
  * SCM_MATCHES_BITS_IN_COMMON in tags.h for more information on
  * how the following macro works.
  */
-#if SCM_ENABLE_ELISP
-# define scm_is_false_or_nil(x)    \
+#define scm_is_false_or_nil(x)    \
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_BOOL_F))
-#else
-# define scm_is_false_or_nil(x)    (scm_is_false_assume_not_nil (x))
-#endif
 #define scm_is_true_and_not_nil(x) (!scm_is_false_or_nil (x))
 
 /* %nil is false. */
@@ -80,13 +76,8 @@
  * SCM_BOOL_T, SCM_ELISP_NIL, or SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0.
  * Otherwise, it returns 0.
  */
-#if SCM_ENABLE_ELISP
-# define scm_is_bool_or_nil(x)  \
+#define scm_is_bool_or_nil(x)  \
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_T, SCM_ELISP_NIL))
-#else
-# define scm_is_bool_or_nil(x)  (scm_is_bool_and_not_nil (x))
-#endif
-
 #define scm_is_bool_and_not_nil(x)  \
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_F, SCM_BOOL_T))
 
@@ -117,11 +108,8 @@ SCM_API int scm_to_bool (SCM x);
  * following: SCM_BOOL_F, SCM_ELISP_NIL, SCM_EOL or
  * SCM_XXX_ANOTHER_LISP_FALSE_DONT_USE.  Otherwise, it returns 0.
  */
-#if SCM_ENABLE_ELISP
-# define scm_is_lisp_false(x)  \
+#define scm_is_lisp_false(x)  \
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_BOOL_F, SCM_EOL))
-# define scm_is_lisp_true(x)   (!scm_is_lisp_false(x))
-#endif
 
 
 
diff --git a/libguile/evalext.c b/libguile/evalext.c
index be775a8..b397cbd 100644
--- a/libguile/evalext.c
+++ b/libguile/evalext.c
@@ -71,7 +71,7 @@ SCM_DEFINE (scm_self_evaluating_p, "self-evaluating?", 1, 0, 
0,
       return SCM_BOOL_T;
     case scm_tc3_imm24:
        /* characters, booleans, other immediates */
-      return scm_from_bool (!scm_is_null (obj));
+      return scm_from_bool (!scm_is_null_and_not_nil (obj));
     case scm_tc3_cons:
       switch (SCM_TYP7 (obj))
        {
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index c1d6aad..851578f 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -232,11 +232,6 @@ main (int argc, char *argv[])
   pf ("/* (value will be 0 or 1). */\n");
   pf ("#define SCM_ENABLE_DEPRECATED %d\n", SCM_I_GSC_ENABLE_DEPRECATED);
 
-  /*** SCM_ENABLE_ELISP (0 or 1) ***/
-  pf ("\n");
-  pf ("/* Set to 1 to add Elisp support (in addition to Scheme). */\n");
-  pf ("#define SCM_ENABLE_ELISP %d /* 0 or 1 */\n", SCM_I_GSC_ENABLE_ELISP);
-
   /*** SCM_STACK_GROWS_UP (0 or 1) ***/
   pf ("\n");
   pf ("/* Set to 1 if the stack grows up, 0 otherwise. */\n");
diff --git a/libguile/gen-scmconfig.h.in b/libguile/gen-scmconfig.h.in
index f36fb09..11c5197 100644
--- a/libguile/gen-scmconfig.h.in
+++ b/libguile/gen-scmconfig.h.in
@@ -9,7 +9,6 @@
 #define SCM_I_GSC_GUILE_DEBUG @SCM_I_GSC_GUILE_DEBUG@
 #define SCM_I_GSC_ENABLE_DISCOURAGED @SCM_I_GSC_ENABLE_DISCOURAGED@
 #define SCM_I_GSC_ENABLE_DEPRECATED @SCM_I_GSC_ENABLE_DEPRECATED@
-#define SCM_I_GSC_ENABLE_ELISP @SCM_I_GSC_ENABLE_ELISP@
 #define SCM_I_GSC_STACK_GROWS_UP @SCM_I_GSC_STACK_GROWS_UP@
 #define SCM_I_GSC_C_INLINE @SCM_I_GSC_C_INLINE@
 #define SCM_I_GSC_NEEDS_STDINT_H @SCM_I_GSC_NEEDS_STDINT_H@
diff --git a/libguile/init.c b/libguile/init.c
index d6f6196..f5e8e64 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -557,9 +557,7 @@ scm_i_init_guile (SCM_STACKITEM *base)
   scm_init_simpos ();
   scm_init_dynamic_linking (); /* Requires smob_prehistory */
   scm_bootstrap_i18n ();
-#if SCM_ENABLE_ELISP
   scm_init_lang ();
-#endif /* SCM_ENABLE_ELISP */
   scm_init_script ();
 
   scm_init_goops ();
diff --git a/libguile/lang.c b/libguile/lang.c
index 85da680..9a87bb4 100644
--- a/libguile/lang.c
+++ b/libguile/lang.c
@@ -1,4 +1,4 @@
-/*     Copyright (C) 1999, 2000, 2001, 2006, 2008 Free Software Foundation, 
Inc.
+/*     Copyright (C) 1999, 2000, 2001, 2006, 2008, 2010 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 License
@@ -36,8 +36,6 @@
 /* {Multi-language support}
  */
 
-#if SCM_ENABLE_ELISP
-
 void
 scm_init_lang ()
 {
@@ -46,8 +44,6 @@ scm_init_lang ()
   scm_c_define ("%nil", SCM_ELISP_NIL);
 }
 
-#endif /* SCM_ENABLE_ELISP */
-
 /*
   Local Variables:
   c-file-style: "gnu"
diff --git a/libguile/lang.h b/libguile/lang.h
index b86fb2e..d0482ee 100644
--- a/libguile/lang.h
+++ b/libguile/lang.h
@@ -3,7 +3,7 @@
 #ifndef SCM_LANG_H
 #define SCM_LANG_H
 
-/* Copyright (C) 1998, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2004, 2006, 2008, 2009, 2010 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 License
@@ -27,20 +27,13 @@
 
 
 
-#if SCM_ENABLE_ELISP
-
 #define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
 
 SCM_INTERNAL void scm_init_lang (void);
 
-#else  /* ! SCM_ENABLE_ELISP */
-
-#define SCM_NILP(x) 0
-
-#endif /* ! SCM_ENABLE_ELISP */
-
 #define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
 
+
 #endif  /* SCM_LANG_H */
 
 /*
diff --git a/libguile/pairs.h b/libguile/pairs.h
index 090c9c1..861f9a0 100644
--- a/libguile/pairs.h
+++ b/libguile/pairs.h
@@ -3,7 +3,7 @@
 #ifndef SCM_PAIRS_H
 #define SCM_PAIRS_H
 
-/* Copyright (C) 1995,1996,2000,2001, 2004, 2006, 2008, 2009 Free Software 
Foundation, Inc.
+/* Copyright (C) 1995,1996,2000,2001, 2004, 2006, 2008, 2009, 2010 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 License
@@ -51,12 +51,8 @@
  * SCM_MATCHES_BITS_IN_COMMON in tags.h for more information on
  * how the following macro works.
  */
-#if SCM_ENABLE_ELISP
-# define scm_is_null_or_nil(x)  \
+#define scm_is_null_or_nil(x)  \
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_EOL))
-#else
-# define scm_is_null_or_nil(x)  (scm_is_null_assume_not_nil (x))
-#endif
 
 /* %nil is null. */
 #define scm_is_null(x)         (scm_is_null_or_nil(x))
diff --git a/libguile/private-options.h b/libguile/private-options.h
index 2e9728d..7ef19c9 100644
--- a/libguile/private-options.h
+++ b/libguile/private-options.h
@@ -91,20 +91,11 @@ SCM_API scm_t_option scm_read_opts[];
 #define SCM_RECORD_POSITIONS_P scm_read_opts[1].val
 #define SCM_CASE_INSENSITIVE_P scm_read_opts[2].val
 #define SCM_KEYWORD_STYLE      scm_read_opts[3].val
-#if SCM_ENABLE_ELISP
 #define SCM_ELISP_VECTORS_P    scm_read_opts[4].val
 #define SCM_ESCAPED_PARENS_P   scm_read_opts[5].val
 #define SCM_R6RS_ESCAPES_P     scm_read_opts[6].val
 #define SCM_SQUARE_BRACKETS_P  scm_read_opts[7].val
-#else
-#define SCM_R6RS_ESCAPES_P     scm_read_opts[4].val
-#define SCM_SQUARE_BRACKETS_P  scm_read_opts[5].val
-#endif
 
-#if SCM_ENABLE_ELISP
 #define SCM_N_READ_OPTIONS 8
-#else
-#define SCM_N_READ_OPTIONS 6
-#endif
 
 #endif  /* PRIVATE_OPTIONS */ 
diff --git a/libguile/read.c b/libguile/read.c
index e17735e..c54fbb6 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -60,6 +60,7 @@
 SCM_GLOBAL_SYMBOL (scm_sym_dot, ".");
 SCM_SYMBOL (scm_keyword_prefix, "prefix");
 SCM_SYMBOL (scm_keyword_postfix, "postfix");
+SCM_SYMBOL (sym_nil, "nil");
 
 scm_t_option scm_read_opts[] = {
   { SCM_OPTION_BOOLEAN, "copy", 0,
@@ -70,12 +71,10 @@ scm_t_option scm_read_opts[] = {
     "Convert symbols to lower case."},
   { SCM_OPTION_SCM, "keywords", (unsigned long) SCM_BOOL_F,
     "Style of keyword recognition: #f, 'prefix or 'postfix."},
-#if SCM_ENABLE_ELISP
   { SCM_OPTION_BOOLEAN, "elisp-vectors", 0,
     "Support Elisp vector syntax, namely `[...]'."},
   { SCM_OPTION_BOOLEAN, "elisp-strings", 0,
     "Support `\\(' and `\\)' in strings."},
-#endif
   { SCM_OPTION_BOOLEAN, "r6rs-hex-escapes", 0,
     "Use R6RS variable-length character and string hex escapes."},
   { SCM_OPTION_BOOLEAN, "square-brackets", 1,
@@ -509,13 +508,11 @@ scm_read_string (int chr, SCM port)
             case '"':
             case '\\':
               break;
-#if SCM_ENABLE_ELISP
             case '(':
             case ')':
               if (SCM_ESCAPED_PARENS_P)
                 break;
               goto bad_escaped;
-#endif
             case '\n':
               continue;
             case '0':
@@ -851,6 +848,19 @@ scm_read_syntax (int chr, SCM port)
 }
 
 static inline SCM
+scm_read_nil (int chr, SCM port)
+{
+  SCM id = scm_read_mixed_case_symbol (chr, port);
+
+  if (!scm_is_eq (id, sym_nil))
+    scm_i_input_error ("scm_read_nil", port,
+                       "unexpected input while reading #nil: ~a",
+                       scm_list_1 (id));
+
+  return SCM_ELISP_NIL;
+}
+  
+static inline SCM
 scm_read_semicolon_comment (int chr, SCM port)
 {
   int c;
@@ -1320,6 +1330,8 @@ scm_read_sharp (scm_t_wchar chr, SCM port)
     case '\'':
     case ',':
       return (scm_read_syntax (chr, port));
+    case 'n':
+      return (scm_read_nil (chr, port));
     default:
       result = scm_read_sharp_extension (chr, port);
       if (scm_is_eq (result, SCM_UNSPECIFIED))
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index f0877b7..ffd1f68 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -2934,7 +2934,8 @@ module '(ice-9 q) '(make-q q-length))}."
 ;;; the readline library.
 (define repl-reader
   (lambda (prompt . reader)
-    (display (if (string? prompt) prompt (prompt)))
+    (if (not (char-ready?))
+        (display (if (string? prompt) prompt (prompt))))
     (force-output)
     (run-hook before-read-hook)
     ((or (and (pair? reader) (car reader))
diff --git a/module/language/assembly.scm b/module/language/assembly.scm
index 908bd90..946caea 100644
--- a/module/language/assembly.scm
+++ b/module/language/assembly.scm
@@ -106,7 +106,7 @@
 (define (object->assembly x)
   (cond ((eq? x #t) `(make-true))
        ((eq? x #f) `(make-false))
-        ((and (defined? '%nil) (eq? x %nil)) `(make-nil))
+        ((eq? x #nil) `(make-nil))
        ((null? x) `(make-eol))
        ((and (integer? x) (exact? x))
         (cond ((and (<= -128 x) (< x 128))
@@ -136,7 +136,7 @@
   (pmatch code
     ((make-true) #t)
     ((make-false) #f) ;; FIXME: Same as the `else' case!
-    ((make-nil) %nil)
+    ((make-nil) #nil)
     ((make-eol) '())
     ((make-int8 ,n)
      (if (< n 128) n (- n 256)))
diff --git a/module/language/elisp/compile-tree-il.scm 
b/module/language/elisp/compile-tree-il.scm
index 9778d1a..47b49d6 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -1,6 +1,6 @@
 ;;; Guile Emacs Lisp
 
-;; Copyright (C) 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2010 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
@@ -750,7 +750,7 @@
     ;                     (if condition
     ;                       (begin body
     ;                              (iterate))
-    ;                       %nil))))
+    ;                       #nil))))
     ;   (iterate))
     ;
     ; As letrec is not directly accessible from elisp, while is implemented 
here
diff --git a/module/language/glil/decompile-assembly.scm 
b/module/language/glil/decompile-assembly.scm
index 9e3a00b..a50b640 100644
--- a/module/language/glil/decompile-assembly.scm
+++ b/module/language/glil/decompile-assembly.scm
@@ -123,7 +123,7 @@
           ((make-false)
            (lp (cdr in) (cons #f stack) out (1+ pos)))
           ((make-nil)
-           (lp (cdr in) (cons %nil stack) out (1+ pos)))
+           (lp (cdr in) (cons #nil stack) out (1+ pos)))
           ((load-program ,labels ,sublen ,meta . ,body)
            (lp (cdr in)
                (cons (decompile-load-program (decompile-meta meta)
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index 51cdedf..d5a4ac7 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -28,7 +28,21 @@
   #:use-module (ice-9 format)
   #:use-module ((system vm inspect) #:select ((inspect . %inspect)))
   #:use-module (system vm program)
-  #:export (debug run-debugger debug-pre-unwind-handler))
+  #:export (*debug-input-port*
+            *debug-output-port*
+            debug run-debugger debug-pre-unwind-handler))
+
+
+
+(define *debug-input-port* (make-fluid))
+(define *debug-output-port* (make-fluid))
+
+(define (debug-input-port)
+  (or (fluid-ref *debug-input-port*)
+      (current-input-port)))
+(define (debug-output-port)
+  (or (fluid-ref *debug-output-port*)
+      (current-error-port)))
 
 
 (define (reverse-hashq h)
@@ -144,13 +158,26 @@
             (set! (prop vm) debugger)
             debugger)))))
 
-(define* (run-debugger stack frames #:optional (vm (the-vm)))
+;; FIXME: Instead of dynamically binding the input and output ports in the
+;; context of the error, the debugger should really be a kind of coroutine,
+;; having its own dynamic input and output bindings. Delimited continuations 
can
+;; do this.
+(define* (run-debugger stack frames #:optional (vm (the-vm)) #:key
+                       (input (debug-input-port)) (output (debug-output-port)))
   (let* ((db (vm-debugger vm))
          (level (debugger-level db)))
     (dynamic-wind
-      (lambda () (set! (debugger-level db) (1+ level)))
-      (lambda () (debugger-repl db stack frames))
-      (lambda () (set! (debugger-level db) level)))))
+      (lambda ()
+        (set! (debugger-level db) (1+ level))
+        (set! input (set-current-input-port input)))
+      (lambda () 
+        (dynamic-wind
+          (lambda () (set! output (set-current-output-port output)))
+          (lambda () (debugger-repl db stack frames))
+          (lambda () (set! output (set-current-output-port output)))))
+      (lambda ()
+        (set! input (set-current-input-port input))
+        (set! (debugger-level db) level)))))
 
 (define (debugger-repl db stack frames)
   (let* ((index 0)
@@ -389,11 +416,12 @@ With an argument, select a frame by index, then show it."
     (lambda (stack)
       (pmatch args
         ((,subr ,msg ,args . ,rest)
-         (format #t "Throw to key `~a':\n" key)
-         (display-error stack (current-output-port) subr msg args rest))
+         (format (debug-output-port) "Throw to key `~a':\n" key)
+         (display-error stack (debug-output-port) subr msg args rest))
         (else
-         (format #t "Throw to key `~a' with args `~s'." key args)))
-      (format #t "Entering the debugger. Type `bt' for a backtrace or `c' to 
continue.\n")
+         (format (debug-output-port) "Throw to key `~a' with args `~s'." key 
args)))
+      (format (debug-output-port)
+              "Entering the debugger. Type `bt' for a backtrace or `c' to 
continue.\n")
       (run-debugger stack
                     (stack->vector
                      ;; by default, narrow to the most recent start-stack
@@ -407,5 +435,5 @@ With an argument, select a frame by index, then show it."
 (define (debug)
   (let ((stack (fluid-ref the-last-stack)))
     (if stack
-       (run-debugger stack (stack->vector stack))
-       (display "Nothing to debug.\n"))))
+        (run-debugger stack (stack->vector stack))
+        (display "Nothing to debug.\n" (debug-output-port)))))


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]