eshell / em-dirs.el

Diff from to


-;;; em-dirs --- directory navigation commands
+;;; em-dirs.el --- directory navigation commands
-;; Copyright (C) 1999, 2000 Free Software Foundation
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 ;; Author: John Wiegley <>
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 (provide 'em-dirs)
   :type 'boolean
   :group 'eshell-dirs)
-;;; Internal  Variables:
+;;; Internal Variables:
 (defvar eshell-dirstack nil
   "List of directories saved by pushd in the Eshell buffer.
-  (make-local-hook 'eshell-parse-argument-hook)
   (add-hook 'eshell-parse-argument-hook
 	    'eshell-parse-user-reference nil t)
   (if (eshell-under-windows-p)
 		'eshell-parse-drive-letter nil t))
   (when (eshell-using-module 'eshell-cmpl)
-    (make-local-hook 'pcomplete-try-first-hook)
     (add-hook 'pcomplete-try-first-hook
 	      'eshell-complete-user-reference nil t))
   (unless eshell-last-dir-ring
     (setq eshell-last-dir-ring (make-ring eshell-last-dir-ring-size)))
-  (make-local-hook 'eshell-exit-hook)
   (add-hook 'eshell-exit-hook 'eshell-write-last-dir-ring nil t)
   (add-hook 'kill-emacs-hook 'eshell-save-some-last-dir))
 	(setq path
 	      (ring-remove eshell-last-dir-ring
 			   (if index
-			       (string-to-int index)
+			       (string-to-number index)
      ((and path (string-match "^=\\(.*\\)$" path))
       (let ((oldpath (eshell-find-previous-directory
 		   (eshell-parse-command "ls" (cdr args))))
+(put 'eshell/cd 'eshell-no-numeric-conversions t)
 (defun eshell-add-to-dir-ring (path)
   "Add PATH to the last-dir-ring, if applicable."
   (unless (and (not (ring-empty-p eshell-last-dir-ring))
 	(eshell/dirs t)))))
+(put 'eshell/pushd 'eshell-no-numeric-conversions t)
 ;;; popd [+n]
 (defun eshell/popd (&rest args)
   "Implementation of popd in Lisp."
 	   (error "Couldn't popd"))))
+(put 'eshell/popd 'eshell-no-numeric-conversions t)
 (defun eshell/dirs (&optional if-verbose)
   "Implementation of dirs in Lisp."
   (when (or (not if-verbose) eshell-dirtrack-verbose)