From 1b3fd89b1c19cdd3203f16584abba38f1c1c722f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 26 May 2015 23:42:59 -0700 Subject: 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. --- lisp/eshell/em-dirs.el | 10 ++++------ lisp/eshell/esh-mode.el | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) 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)) -- cgit v1.2.1