;;; em-dirs.el --- directory navigation commands
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
(require 'esh-opt)
;;;###autoload
-(eshell-defgroup eshell-dirs nil
+(progn
+(defgroup eshell-dirs nil
"Directory navigation involves changing directories, examining the
current directory, maintaining a directory stack, and also keeping
track of a history of the last directory locations the user was in.
Emacs does provide standard Lisp definitions of `pwd' and `cd', but
they lack somewhat in feel from the typical shell equivalents."
:tag "Directory navigation"
- :group 'eshell-module)
+ :group 'eshell-module))
;;; User Variables:
-(defcustom eshell-dirs-load-hook '(eshell-dirs-initialize)
- "*A hook that gets run when `eshell-dirs' is loaded."
+(defcustom eshell-dirs-load-hook nil
+ "A hook that gets run when `eshell-dirs' is loaded."
+ :version "24.1" ; removed eshell-dirs-initialize
:type 'hook
:group 'eshell-dirs)
(defcustom eshell-pwd-convert-function (if (eshell-under-windows-p)
'expand-file-name
'identity)
- "*The function used to normalize the value of Eshell's `pwd'.
+ "The function used to normalize the value of Eshell's `pwd'.
The value returned by `pwd' is also used when recording the
last-visited directory in the last-dir-ring, so it will affect the
form of the list used by 'cd ='."
:group 'eshell-dirs)
(defcustom eshell-ask-to-save-last-dir 'always
- "*Determine if the last-dir-ring should be automatically saved.
+ "Determine if the last-dir-ring should be automatically saved.
The last-dir-ring is always preserved when exiting an Eshell buffer.
However, when Emacs is being shut down, this variable determines
whether to prompt the user, or just save the ring.
:group 'eshell-dirs)
(defcustom eshell-cd-shows-directory nil
- "*If non-nil, using `cd' will report the directory it changes to."
+ "If non-nil, using `cd' will report the directory it changes to."
:type 'boolean
:group 'eshell-dirs)
(defcustom eshell-cd-on-directory t
- "*If non-nil, do a cd if a directory is in command position."
+ "If non-nil, do a cd if a directory is in command position."
:type 'boolean
:group 'eshell-dirs)
(defcustom eshell-directory-change-hook nil
- "*A hook to run when the current directory changes."
+ "A hook to run when the current directory changes."
:type 'hook
:group 'eshell-dirs)
(defcustom eshell-list-files-after-cd nil
- "*If non-nil, call \"ls\" with any remaining args after doing a cd.
+ "If non-nil, call \"ls\" with any remaining args after doing a cd.
This is provided for convenience, since the same effect is easily
achieved by adding a function to `eshell-directory-change-hook' that
calls \"ls\" and references `eshell-last-arguments'."
:group 'eshell-dirs)
(defcustom eshell-pushd-tohome nil
- "*If non-nil, make pushd with no arg behave as 'pushd ~' (like `cd').
+ "If non-nil, make pushd with no arg behave as 'pushd ~' (like `cd').
This mirrors the optional behavior of tcsh."
:type 'boolean
:group 'eshell-dirs)
(defcustom eshell-pushd-dextract nil
- "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top.
+ "If non-nil, make \"pushd +n\" pop the nth dir to the stack top.
This mirrors the optional behavior of tcsh."
:type 'boolean
:group 'eshell-dirs)
(defcustom eshell-pushd-dunique nil
- "*If non-nil, make pushd only add unique directories to the stack.
+ "If non-nil, make pushd only add unique directories to the stack.
This mirrors the optional behavior of tcsh."
:type 'boolean
:group 'eshell-dirs)
(defcustom eshell-dirtrack-verbose t
- "*If non-nil, show the directory stack following directory change.
+ "If non-nil, show the directory stack following directory change.
This is effective only if directory tracking is enabled."
:type 'boolean
:group 'eshell-dirs)
(defcustom eshell-last-dir-ring-file-name
(expand-file-name "lastdir" eshell-directory-name)
- "*If non-nil, name of the file to read/write the last-dir-ring.
+ "If non-nil, name of the file to read/write the last-dir-ring.
See also `eshell-read-last-dir-ring' and `eshell-write-last-dir-ring'.
If it is nil, the last-dir-ring will not be written to disk."
:type 'file
:group 'eshell-dirs)
(defcustom eshell-last-dir-ring-size 32
- "*If non-nil, the size of the directory history ring.
+ "If non-nil, the size of the directory history ring.
This ring is added to every time `cd' or `pushd' is used. It simply
stores the most recent directory locations Eshell has been in. To
return to the most recent entry, use 'cd -' (equivalent to 'cd -0').
directories gets pushed, and its size is unlimited.
`eshell-last-dir-ring' is meant for users who don't use `pushd'
-explicity very much, but every once in a while would like to return to
+explicitly very much, but every once in a while would like to return to
a previously visited directory without having to type in the whole
thing again."
:type 'integer
:group 'eshell-dirs)
(defcustom eshell-last-dir-unique t
- "*If non-nil, `eshell-last-dir-ring' contains only unique entries."
+ "If non-nil, `eshell-last-dir-ring' contains only unique entries."
:type 'boolean
:group 'eshell-dirs)
(defun eshell-save-some-last-dir ()
"Save the list-dir-ring for any open Eshell buffers."
- (eshell-for buf (buffer-list)
+ (dolist (buf (buffer-list))
(if (buffer-live-p buf)
(with-current-buffer buf
(if (and eshell-mode
;; generated-autoload-file: "esh-groups.el"
;; End:
-;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787
;;; em-dirs.el ends here