From 2fdbfe2ca41b30ab4275b1691464e7cc208409a4 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Tue, 4 Dec 2018 15:24:30 -0500 Subject: [PATCH] Add a prefix to break and continue These names are too common, and it will be even worse with 'exit' and 'return'. * geesh/environment.scm (break): Rename this... (sh:break) ...to this. (continue): Rename this... (sh:continue) ...to this. * geesh/built-ins/break.scm (main): Update call. * geesh/built-ins/continue.scm (main): Ditto. --- geesh/built-ins/break.scm | 2 +- geesh/built-ins/continue.scm | 2 +- geesh/environment.scm | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/geesh/built-ins/break.scm b/geesh/built-ins/break.scm index 1ff8426..ca45dc9 100644 --- a/geesh/built-ins/break.scm +++ b/geesh/built-ins/break.scm @@ -33,4 +33,4 @@ (begin ;; Since we do not return, we have to set the status here. (set-status! 0) - (break (1- n)))))) + (sh:break (1- n)))))) diff --git a/geesh/built-ins/continue.scm b/geesh/built-ins/continue.scm index e221453..d52a76a 100644 --- a/geesh/built-ins/continue.scm +++ b/geesh/built-ins/continue.scm @@ -33,4 +33,4 @@ (begin ;; Since we do not return, we have to set the status here. (set-status! 0) - (continue (1- n)))))) + (sh:continue (1- n)))))) diff --git a/geesh/environment.scm b/geesh/environment.scm index 2136878..f1caf58 100644 --- a/geesh/environment.scm +++ b/geesh/environment.scm @@ -42,9 +42,9 @@ *option-names* *option-letters* call-with-continue - continue + sh:continue call-with-break - break + sh:break *fd-count* fd->current-port)) @@ -297,7 +297,7 @@ exit the dynamic extent of @var{thunk}." (false-if-exception (abort-to-prompt *continue-tag* (1- n))))))) -(define* (continue #:optional (n 0)) +(define* (sh:continue #:optional (n 0)) "Exit to the closest invocation of @code{call-with-continue}. If @var{n} is set, exit to the @math{n + 1}th closest invocation." (abort-to-prompt *continue-tag* n)) @@ -314,7 +314,7 @@ exit the dynamic extent of @var{thunk}." (false-if-exception (abort-to-prompt *break-tag* (1- n))))))) -(define* (break #:optional (n 0)) +(define* (sh:break #:optional (n 0)) "Exit to the closest invocation of @code{call-with-break}. If @var{n} is set, exit to the @math{n + 1}th closest invocation." (abort-to-prompt *break-tag* n))