@@ -169,17 +169,16 @@ This may be useful for debugging."
169169 dialect)
170170 dialect))
171171 (inf-buf (inferior-ess--get-proc-buffer-create temp-dialect))
172- (proc-name (buffer-local-value 'ess-local-process-name inf-buf))
173- (cur-dir (inferior-ess--maybe-prompt-startup-directory proc-name temp-dialect))
174- (default-directory cur-dir))
172+ (proc-name (buffer-local-value 'ess-local-process-name inf-buf)))
175173 (with-current-buffer inf-buf
176174 ; ; TODO: Get rid of this, we should rely on modes to set the
177175 ; ; variables they need.
178176 (ess-setq-vars-local customize-alist)
179177 (inferior-ess--set-major-mode ess-dialect)
180178 ; ; Set local variables after changing mode because they might
181179 ; ; not be permanent
182- (setq default-directory cur-dir)
180+ (setq default-directory
181+ (inferior-ess--maybe-prompt-startup-directory proc-name temp-dialect))
183182 (setq inferior-ess--local-data (cons inferior-ess-program start-args))
184183 ; ; Read the history file
185184 (when ess-history-file
@@ -204,7 +203,7 @@ This may be useful for debugging."
204203 (unless (and proc (eq (process-status proc) 'run ))
205204 (error " Process %s failed to start " proc-name))
206205 (when ess-setwd-command
207- (ess-set-working-directory cur-dir ))
206+ (ess-set-working-directory default-directory ))
208207 (setq-local font-lock-fontify-region-function #'inferior-ess-fontify-region )
209208 (setq-local ess-sl-modtime-alist nil )
210209 (run-hooks 'ess-post-run-hook )
0 commit comments