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-15-9-g36a


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-9-g36ad253
Date: Tue, 08 Feb 2011 21:38:42 +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=36ad25332e1de74405cc2e8f6630cae0597f8576

The branch, master has been updated
       via  36ad25332e1de74405cc2e8f6630cae0597f8576 (commit)
       via  4b1eb2b27ab1d1834ee434826b7569d8cae4f1a0 (commit)
      from  0f550375beb04fc9cba47230b5aa39e057568ef1 (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 36ad25332e1de74405cc2e8f6630cae0597f8576
Author: Andy Wingo <address@hidden>
Date:   Tue Feb 8 22:43:43 2011 +0100

    fix quasiquote test
    
    * test-suite/tests/syntax.test ("quasiquote"): Fix unquote-splicing
      extra args test to update for current behavior.

commit 4b1eb2b27ab1d1834ee434826b7569d8cae4f1a0
Author: Andy Wingo <address@hidden>
Date:   Tue Feb 8 22:41:36 2011 +0100

    hackily fix another case where display-exception would be apropos
    
    * module/system/repl/error-handling.scm (display-syntax-error)
      (error-string): Until we get the exception-printing patch merged in,
      copy display-syntax-error into error-handling so that we avoid
      display-error.  Fixes bug 32365.

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

Summary of changes:
 module/system/repl/error-handling.scm |   28 +++++++++++++++++++++++++++-
 test-suite/tests/syntax.test          |   10 +++++-----
 2 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/module/system/repl/error-handling.scm 
b/module/system/repl/error-handling.scm
index 7d30bf0..59c44a9 100644
--- a/module/system/repl/error-handling.scm
+++ b/module/system/repl/error-handling.scm
@@ -1,6 +1,6 @@
 ;;; Error handling in the REPL
 
-;; Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2009, 2010, 2011 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
@@ -29,12 +29,38 @@
 
 
 
+;; Temporary hacked copy of repl.scm's display-syntax error, until we
+;; merge in the proper display-exception patches.
+(define (display-syntax-error port who what where form subform extra)
+  (display "Syntax error:" port)
+  (newline port)
+  (if where
+      (let ((file (or (assq-ref where 'filename) "unknown file"))
+            (line (and=> (assq-ref where 'line) 1+))
+            (col (assq-ref where 'column)))
+        (format port "~a:~a:~a: " file line col))
+      (format port "unknown location: "))
+  (if who
+      (format port "~a: " who))
+  (format port "~a" what)
+  (if subform
+      (format port " in subform ~s of ~s" subform form)
+      (if form
+          (format port " in form ~s" form)))
+  (newline port))
+
 ;;;
 ;;; Error handling via repl debugging
 ;;;
 
 (define (error-string stack key args)
   (pmatch args
+    ((,who ,message ,where ,form ,subform . ,rest)
+     (guard (eq? key 'syntax-error))
+     (with-output-to-string
+       (lambda ()
+         (display-syntax-error (current-output-port)
+                               who message where form subform rest))))
     ((,subr ,msg ,args . ,rest)
      (guard (> (vector-length stack) 0))
      (with-output-to-string
diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
index b6fd39f..b33df7c 100644
--- a/test-suite/tests/syntax.test
+++ b/test-suite/tests/syntax.test
@@ -1,6 +1,6 @@
 ;;;; syntax.test --- test suite for Guile's syntactic forms    -*- scheme -*-
 ;;;;
-;;;; Copyright (C) 2001,2003,2004, 2005, 2006, 2009, 2010 Free Software 
Foundation, Inc.
+;;;; Copyright (C) 2001,2003,2004, 2005, 2006, 2009, 2010, 2011 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
@@ -140,10 +140,10 @@
 
   (with-test-prefix "unquote-splicing"
 
-    (pass-if-syntax-error "extra arguments"
-      "unquote-splicing takes exactly one argument"
-      (eval '(quasiquote ((unquote-splicing (list 1 2) (list 3 4))))
-            (interaction-environment)))))
+    (pass-if "extra arguments"
+      (equal? (eval '(quasiquote ((unquote-splicing (list 1 2) (list 3 4))))
+                    (interaction-environment))
+              '(1 2 3 4)))))
 
 (with-test-prefix "begin"
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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