From: Glenn Morris Date: Wed, 27 May 2015 06:42:59 +0000 (-0700) Subject: No longer set dired-directory in eshell. (Bug#16477) X-Git-Tag: emacs-25.0.90~1961 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1b3fd89b1c19cdd3203f16584abba38f1c1c722f;p=emacs.git 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. --- diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 84d46dcfeeb..e9458ccd85f 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -348,8 +348,6 @@ in the minibuffer: index (1+ index))))) oldpath)) -(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: (path (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) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 0dac4780690..22ccf4e91f9 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -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))