Mercurial > emacs
diff lisp/eshell/em-dirs.el @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 6eb625bead4f |
children |
line wrap: on
line diff
--- a/lisp/eshell/em-dirs.el Sun Jan 15 23:02:10 2006 +0000 +++ b/lisp/eshell/em-dirs.el Mon Jan 16 00:03:54 2006 +0000 @@ -1,6 +1,7 @@ ;;; em-dirs.el --- directory navigation commands -;; Copyright (C) 1999, 2000 Free Software Foundation +;; Copyright (C) 1999, 2000, 2002, 2003, 2004, +;; 2005 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -18,12 +19,13 @@ ;; 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) (eval-when-compile (require 'esh-maint)) +(require 'eshell) (defgroup eshell-dirs nil "Directory navigation involves changing directories, examining the @@ -275,8 +277,7 @@ (let* ((letter (match-string 1)) (regexp (concat "\\`" letter)) (path (eshell-find-previous-directory regexp))) - (concat (or path letter) - (char-to-string directory-sep-char))))) + (concat (or path letter) "/")))) (defun eshell-complete-user-reference () "If there is a user reference, complete it." @@ -299,7 +300,7 @@ (let* ((path default-directory) (len (length path))) (if (and (> len 1) - (eq (aref path (1- len)) directory-sep-char) + (eq (aref path (1- len)) ?/) (not (and (eshell-under-windows-p) (string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) (setq path (substring path 0 (1- (length path))))) @@ -323,9 +324,7 @@ (len (length extra-dots)) replace-text) (while (> len 0) - (setq replace-text - (concat replace-text - (char-to-string directory-sep-char) "..") + (setq replace-text (concat replace-text "/..") len (1- len))) (setq path (replace-match replace-text t t path 1)))) @@ -370,7 +369,7 @@ (setq path (ring-remove eshell-last-dir-ring (if index - (string-to-int index) + (string-to-number index) 0))))) ((and path (string-match "^=\\(.*\\)$" path)) (let ((oldpath (eshell-find-previous-directory @@ -569,4 +568,5 @@ ;;; Code: +;;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787 ;;; em-dirs.el ends here