comparison lisp/eshell/em-dirs.el @ 87066:14174df2455d

Require individual files if needed when compiling, rather than esh-maint. Collect any require statements. Move provide statement to end. Move any commentary to start.
author Glenn Morris <rgm@gnu.org>
date Wed, 05 Dec 2007 07:00:59 +0000
parents e0ca14d507a5
children 107ccd98fa12 53108e6cea98
comparison
equal deleted inserted replaced
87065:ad15f913bd02 87066:14174df2455d
19 19
20 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA. 23 ;; Boston, MA 02110-1301, USA.
24
25 (provide 'em-dirs)
26
27 (eval-when-compile (require 'esh-maint))
28 (require 'eshell)
29
30 (defgroup eshell-dirs nil
31 "Directory navigation involves changing directories, examining the
32 current directory, maintaining a directory stack, and also keeping
33 track of a history of the last directory locations the user was in.
34 Emacs does provide standard Lisp definitions of `pwd' and `cd', but
35 they lack somewhat in feel from the typical shell equivalents."
36 :tag "Directory navigation"
37 :group 'eshell-module)
38 24
39 ;;; Commentary: 25 ;;; Commentary:
40 26
41 ;; The only special feature that Eshell offers in the last-dir-ring. 27 ;; The only special feature that Eshell offers in the last-dir-ring.
42 ;; To view the ring, enter: 28 ;; To view the ring, enter:
55 ;; 41 ;;
56 ;; This ring is maintained automatically, and is persisted across 42 ;; This ring is maintained automatically, and is persisted across
57 ;; Eshell sessions. It is a separate mechanism from `pushd' and 43 ;; Eshell sessions. It is a separate mechanism from `pushd' and
58 ;; `popd', and the two may be used at the same time. 44 ;; `popd', and the two may be used at the same time.
59 45
46 ;;; Code:
47
48 (require 'eshell)
60 (require 'ring) 49 (require 'ring)
61 (require 'esh-opt) 50 (require 'esh-opt)
51
52 (defgroup eshell-dirs nil
53 "Directory navigation involves changing directories, examining the
54 current directory, maintaining a directory stack, and also keeping
55 track of a history of the last directory locations the user was in.
56 Emacs does provide standard Lisp definitions of `pwd' and `cd', but
57 they lack somewhat in feel from the typical shell equivalents."
58 :tag "Directory navigation"
59 :group 'eshell-module)
62 60
63 ;;; User Variables: 61 ;;; User Variables:
64 62
65 (defcustom eshell-dirs-load-hook '(eshell-dirs-initialize) 63 (defcustom eshell-dirs-load-hook '(eshell-dirs-initialize)
66 "*A hook that gets run when `eshell-dirs' is loaded." 64 "*A hook that gets run when `eshell-dirs' is loaded."
564 (insert (eshell/pwd) ?\n) 562 (insert (eshell/pwd) ?\n)
565 (eshell-with-private-file-modes 563 (eshell-with-private-file-modes
566 (write-region (point-min) (point-max) file nil 564 (write-region (point-min) (point-max) file nil
567 'no-message)))))))) 565 'no-message))))))))
568 566
569 ;;; Code: 567 (provide 'em-dirs)
570 568
571 ;;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787 569 ;;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787
572 ;;; em-dirs.el ends here 570 ;;; em-dirs.el ends here