]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-dirs.el
Fix minor quoting problems in doc strings
[gnu-emacs] / lisp / eshell / em-dirs.el
index afc67c2e5ff7c99e848dcd4ef769d0218b10a018..8a3b5817d5f8373fa8cc7088158bdd5005562501 100644 (file)
@@ -1,6 +1,6 @@
 ;;; em-dirs.el --- directory navigation commands  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -300,7 +300,7 @@ Thus, this does not include the current directory.")
                 eshell-user-names)))))))
 
 (defun eshell/pwd (&rest args)
-  "Change output from `pwd` to be cleaner."
+  "Change output from ‘pwd’ to be cleaner."
   (let* ((path default-directory)
         (len (length path)))
     (if (and (> len 1)
@@ -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)