Skip to content

Commit 3932fab

Browse files
resyntax-ci[bot]rfindler
authored andcommitted
Fix 1 occurrence of cond-let-to-cond-define
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
1 parent 33f4e0e commit 3932fab

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drracket/gui-debugger/debug-tool.rkt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,14 @@
262262
(define-values (x y) (send editor dc-location-to-editor-location event-x event-y))
263263
(cond
264264
[(is-a? editor text%)
265-
(let ([pos (send editor find-position x y #f on-it?)])
266-
(cond
267-
[(not (unbox on-it?)) (values #f #f)]
268-
[else
269-
(let ([snip (send editor find-snip pos 'after-or-none)])
270-
(if (and snip (is-a? snip editor-snip%))
271-
(loop (send snip get-editor))
272-
(values pos editor)))]))]
265+
(define pos (send editor find-position x y #f on-it?))
266+
(cond
267+
[(not (unbox on-it?)) (values #f #f)]
268+
[else
269+
(let ([snip (send editor find-snip pos 'after-or-none)])
270+
(if (and snip (is-a? snip editor-snip%))
271+
(loop (send snip get-editor))
272+
(values pos editor)))])]
273273
[(is-a? editor pasteboard%)
274274
(define snip (send editor find-snip x y))
275275
(if (and snip (is-a? snip editor-snip%))

0 commit comments

Comments
 (0)