]> code.delx.au - gnu-emacs/commitdiff
No longer set dired-directory in eshell. (Bug#16477)
authorGlenn Morris <rgm@gnu.org>
Wed, 27 May 2015 06:42:59 +0000 (23:42 -0700)
committerGlenn Morris <rgm@gnu.org>
Wed, 27 May 2015 06:42:59 +0000 (23:42 -0700)
* lisp/eshell/esh-mode.el (eshell-mode):
* lisp/eshell/em-dirs.el (eshell/cd): No longer set dired-directory.

lisp/eshell/em-dirs.el
lisp/eshell/esh-mode.el

index 84d46dcfeebc55d7b64a42e1450d35a61c7f73e2..e9458ccd85f2efd7ae422cb24034c6de4ecfdf9a 100644 (file)
@@ -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)
index 0dac47806907819b4f523c695a69f65676c25cc9..22ccf4e91f95379e7a696eb9b4035378d3d39212 100644 (file)
@@ -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))