summaryrefslogtreecommitdiff
path: root/module/system
diff options
context:
space:
mode:
Diffstat (limited to 'module/system')
-rw-r--r--module/system/repl/error-handling.scm6
-rw-r--r--module/system/repl/repl.scm16
-rw-r--r--module/system/vm/inspect.scm21
3 files changed, 19 insertions, 24 deletions
diff --git a/module/system/repl/error-handling.scm b/module/system/repl/error-handling.scm
index c6c64cc73..2a585aaff 100644
--- a/module/system/repl/error-handling.scm
+++ b/module/system/repl/error-handling.scm
@@ -182,7 +182,5 @@
(apply (if (memq k pass-keys) throw on-error) k args))
(error "Unknown on-error strategy" on-error)))))))
-(define-syntax with-error-handling
- (syntax-rules ()
- ((_ form)
- (call-with-error-handling (lambda () form)))))
+(define-syntax-rule (with-error-handling form)
+ (call-with-error-handling (lambda () form)))
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index 5bab7780e..1cffa7187 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -135,15 +135,13 @@
(run-repl (make-repl lang debug)))
;; (put 'abort-on-error 'scheme-indent-function 1)
-(define-syntax abort-on-error
- (syntax-rules ()
- ((_ string exp)
- (catch #t
- (lambda () exp)
- (lambda (key . args)
- (format #t "While ~A:~%" string)
- (print-exception (current-output-port) #f key args)
- (abort))))))
+(define-syntax-rule (abort-on-error string exp)
+ (catch #t
+ (lambda () exp)
+ (lambda (key . args)
+ (format #t "While ~A:~%" string)
+ (print-exception (current-output-port) #f key args)
+ (abort))))
(define (run-repl repl)
(define (with-stack-and-prompt thunk)
diff --git a/module/system/vm/inspect.scm b/module/system/vm/inspect.scm
index aebf50d30..1023437bf 100644
--- a/module/system/vm/inspect.scm
+++ b/module/system/vm/inspect.scm
@@ -1,6 +1,6 @@
;;; Guile VM debugging facilities
-;;; 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
@@ -81,16 +81,15 @@
;;;
(define (inspect x)
- (define-syntax define-command
- (syntax-rules ()
- ((_ ((mod cname alias ...) . args) body ...)
- (define cname
- (let ((c (lambda* args body ...)))
- (set-procedure-property! c 'name 'cname)
- (module-define! mod 'cname c)
- (module-add! mod 'alias (module-local-variable mod 'cname))
- ...
- c)))))
+ (define-syntax-rule (define-command ((mod cname alias ...) . args)
+ body ...)
+ (define cname
+ (let ((c (lambda* args body ...)))
+ (set-procedure-property! c 'name 'cname)
+ (module-define! mod 'cname c)
+ (module-add! mod 'alias (module-local-variable mod 'cname))
+ ...
+ c)))
(let ((commands (make-module)))
(define (prompt)