macro-stepper: fix relative require bug (set current-directory)
related to PR 12486
This commit is contained in:
parent
f173b9977c
commit
f711f3385c
|
@ -13,7 +13,8 @@
|
||||||
images/compile-time
|
images/compile-time
|
||||||
(for-syntax racket/base images/icons/tool)
|
(for-syntax racket/base images/icons/tool)
|
||||||
;; FIXME:
|
;; FIXME:
|
||||||
drracket/private/syncheck/local-member-names)
|
drracket/private/syncheck/local-member-names
|
||||||
|
drracket/private/eval-helpers)
|
||||||
|
|
||||||
;; Capability name: 'macro-stepper:enabled
|
;; Capability name: 'macro-stepper:enabled
|
||||||
|
|
||||||
|
@ -236,7 +237,7 @@
|
||||||
(current-module-name-resolver the-module-name-resolver)
|
(current-module-name-resolver the-module-name-resolver)
|
||||||
|
|
||||||
(send the-tab set-breakables (current-thread) (current-custodian))
|
(send the-tab set-breakables (current-thread) (current-custodian))
|
||||||
;; (set-directory definitions-text)
|
(set-directory definitions-text)
|
||||||
(current-load-relative-directory #f)
|
(current-load-relative-directory #f)
|
||||||
(current-error-port error-port)
|
(current-error-port error-port)
|
||||||
(current-output-port output-port)
|
(current-output-port output-port)
|
||||||
|
@ -336,6 +337,14 @@
|
||||||
#t)))
|
#t)))
|
||||||
(void))
|
(void))
|
||||||
|
|
||||||
|
;; set-directory : text -> void
|
||||||
|
;; sets the current-directory based on the file saved in the definitions-text
|
||||||
|
(define/private (set-directory definitions-text)
|
||||||
|
(define tmp-b (box #f))
|
||||||
|
(define fn (send definitions-text get-filename tmp-b))
|
||||||
|
(define dir (get-init-dir (and (not (unbox tmp-b)) fn)))
|
||||||
|
(current-directory dir))
|
||||||
|
|
||||||
;; with-lock/edit-sequence : text (-> void) -> void
|
;; with-lock/edit-sequence : text (-> void) -> void
|
||||||
;; sets and restores some state of the definitions text
|
;; sets and restores some state of the definitions text
|
||||||
;; so that edits to the definitions text work out.
|
;; so that edits to the definitions text work out.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user