Skip to content

Commit

Permalink
Fix 1 occurrence of let-to-define
Browse files Browse the repository at this point in the history
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
  • Loading branch information
resyntax-ci[bot] committed Jan 5, 2025
1 parent 43d77bb commit 76a0a56
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions drracket/gui-debugger/debug-tool.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,21 @@
(format "(set! ~a ...)" id-sym)
menu
(lambda (item evt)
(let* ([tmp (get-text-from-user (format "New value for ~a" id-sym)
#f
#f
(format "~a" val))])
(when tmp
(let/ec k
(wr (with-handlers ([exn:fail?
(lambda (exn)
(message-box
"Debugger Error"
(format "The following error occurred: ~a"
(exn-message exn)))
(k))])
(read (open-input-string tmp)))))))))
(define tmp
(get-text-from-user (format "New value for ~a" id-sym)
#f
#f
(format "~a" val)))
(when tmp
(let/ec k
(wr (with-handlers ([exn:fail?
(lambda (exn)
(message-box
"Debugger Error"
(format "The following error occurred: ~a"
(exn-message exn)))
(k))])
(read (open-input-string tmp))))))))
(send (get-canvas)
popup-menu
menu
Expand Down

0 comments on commit 76a0a56

Please sign in to comment.