Commit 1b3fd89b authored by Glenn Morris's avatar Glenn Morris
Browse files

No longer set dired-directory in eshell. (Bug#16477)

* lisp/eshell/esh-mode.el (eshell-mode):
* lisp/eshell/em-dirs.el (eshell/cd): No longer set dired-directory.
parent b38bc40d
......@@ -348,8 +348,6 @@ in the minibuffer:
index (1+ index)))))
(defvar dired-directory)
(defun eshell/cd (&rest args) ; all but first ignored
"Alias to extend the behavior of `cd'."
(setq args (eshell-flatten-list args))
......@@ -394,11 +392,11 @@ in the minibuffer:
(setq path (eshell-expand-multiple-dots path))))
(unless handled
(setq dired-directory (or path "~"))
(let ((curdir (eshell/pwd)))
(unless (equal curdir dired-directory)
(let ((curdir (eshell/pwd))
(newdir (or path "~")))
(unless (equal curdir newdir)
(eshell-add-to-dir-ring curdir))
(let ((result (cd dired-directory)))
(let ((result (cd newdir)))
(and eshell-cd-shows-directory
(eshell-printn result)))
(run-hooks 'eshell-directory-change-hook)
......@@ -344,7 +344,6 @@ and the hook `eshell-exit-hook'."
(setq local-abbrev-table eshell-mode-abbrev-table)
(set (make-local-variable 'dired-directory) default-directory)
(set (make-local-variable 'list-buffers-directory)
(expand-file-name default-directory))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment