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.
This commit is contained in:
Timothy Sample 2018-12-04 15:24:30 -05:00
parent 118750bb79
commit 2fdbfe2ca4
3 changed files with 6 additions and 6 deletions

View File

@ -33,4 +33,4 @@
(begin (begin
;; Since we do not return, we have to set the status here. ;; Since we do not return, we have to set the status here.
(set-status! 0) (set-status! 0)
(break (1- n)))))) (sh:break (1- n))))))

View File

@ -33,4 +33,4 @@
(begin (begin
;; Since we do not return, we have to set the status here. ;; Since we do not return, we have to set the status here.
(set-status! 0) (set-status! 0)
(continue (1- n)))))) (sh:continue (1- n))))))

View File

@ -42,9 +42,9 @@
*option-names* *option-names*
*option-letters* *option-letters*
call-with-continue call-with-continue
continue sh:continue
call-with-break call-with-break
break sh:break
*fd-count* *fd-count*
fd->current-port)) fd->current-port))
@ -297,7 +297,7 @@ exit the dynamic extent of @var{thunk}."
(false-if-exception (false-if-exception
(abort-to-prompt *continue-tag* (1- n))))))) (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 "Exit to the closest invocation of @code{call-with-continue}. If
@var{n} is set, exit to the @math{n + 1}th closest invocation." @var{n} is set, exit to the @math{n + 1}th closest invocation."
(abort-to-prompt *continue-tag* n)) (abort-to-prompt *continue-tag* n))
@ -314,7 +314,7 @@ exit the dynamic extent of @var{thunk}."
(false-if-exception (false-if-exception
(abort-to-prompt *break-tag* (1- n))))))) (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 "Exit to the closest invocation of @code{call-with-break}. If
@var{n} is set, exit to the @math{n + 1}th closest invocation." @var{n} is set, exit to the @math{n + 1}th closest invocation."
(abort-to-prompt *break-tag* n)) (abort-to-prompt *break-tag* n))