set the current-load-relative-directory to #f (initially) in drracket
This commit is contained in:
parent
153dd73f6b
commit
25271be3e8
|
@ -90,8 +90,8 @@
|
|||
#:use-use-current-security-guard? #t)
|
||||
(log-info "expanding-place.rkt: 04 setting directories")
|
||||
(let ([init-dir (get-init-dir path)])
|
||||
(current-directory init-dir)
|
||||
(current-load-relative-directory init-dir))
|
||||
(current-directory init-dir))
|
||||
(current-load-relative-directory #f)
|
||||
(define sp (open-input-string program-as-string))
|
||||
(port-count-lines! sp)
|
||||
(log-info "expanding-place.rkt: 05 installing security guard")
|
||||
|
|
|
@ -105,8 +105,7 @@ remain the same for tools that use them.
|
|||
|
||||
get-directory ;; (-> (union #f string[existing directory]))
|
||||
;; returns the directory that should be the default for
|
||||
;; the `current-directory' and `current-load-relative-directory'
|
||||
;; parameters in the repl.
|
||||
;; the `current-directory' parameter in the repl.
|
||||
))
|
||||
|
||||
(define unit:tab<%>
|
||||
|
|
|
@ -876,7 +876,7 @@
|
|||
p))))
|
||||
(current-output-port (swallow-specials original-output-port))
|
||||
(current-error-port (swallow-specials original-error-port))
|
||||
(current-load-relative-directory init-dir)
|
||||
(current-load-relative-directory #f)
|
||||
(current-directory init-dir)
|
||||
(error-display-handler (λ (str exn) (set! error-str str)))
|
||||
|
||||
|
@ -1041,7 +1041,9 @@
|
|||
(build-module-filename
|
||||
(if (regexp-match #rx"^," name)
|
||||
(substring name 1 (string-length name))
|
||||
(build-path (current-load-relative-directory) name)))])
|
||||
(build-path (or (current-load-relative-directory)
|
||||
(current-directory))
|
||||
name)))])
|
||||
(add-module-code-connections base module-code))))
|
||||
module-codes)))
|
||||
|
||||
|
|
|
@ -1867,6 +1867,7 @@ If the namespace does not, they are colored the unbound color.
|
|||
(λ () ; =user=
|
||||
(send the-tab set-breakables (current-thread) (current-custodian))
|
||||
(set-directory definitions-text)
|
||||
(current-load-relative-directory #f)
|
||||
(current-error-port error-port)
|
||||
(current-output-port output-port)
|
||||
(error-display-handler
|
||||
|
@ -2016,14 +2017,12 @@ If the namespace does not, they are colored the unbound color.
|
|||
|
||||
|
||||
;; set-directory : text -> void
|
||||
;; sets the current-directory and current-load-relative-directory
|
||||
;; based on the file saved in the definitions-text
|
||||
;; 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)
|
||||
(current-load-relative-directory dir))
|
||||
(current-directory dir))
|
||||
|
||||
;; with-lock/edit-sequence : text (-> void) -> void
|
||||
;; sets and restores some state of the definitions text
|
||||
|
|
|
@ -3365,16 +3365,6 @@ module browser threading seems wrong.
|
|||
(send module-browser-name-length-choice enable #t)
|
||||
(close-status-line 'plt:module-browser))))
|
||||
|
||||
;; set-directory : text -> void
|
||||
;; sets the current-directory and current-load-relative-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)
|
||||
(current-load-relative-directory dir))
|
||||
|
||||
|
||||
;
|
||||
;
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
Version 5.2.1
|
||||
------------------------------
|
||||
|
||||
. The initial current-directory and current-load-relative-directory
|
||||
for unsaved programs in DrRacket is now the user's home directory,
|
||||
instead of whatever the current-directory was for the underlying
|
||||
OS process.
|
||||
. The initial current-directory for unsaved programs in DrRacket is
|
||||
now the user's home directory, instead of whatever the
|
||||
current-directory was for the underlying OS process.
|
||||
|
||||
. The current-load-relative-directory is now set to #f initially in
|
||||
DrRacket (to better match what Racket does).
|
||||
|
||||
. DrRacket no longer shows a stacktrace for syntax errors in the REPL.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user