comparison lisp/eshell/em-unix.el @ 87076:9b97b187c7e2

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:03:05 +0000
parents 794e428cd497
children 107ccd98fa12 53108e6cea98
comparison
equal deleted inserted replaced
87075:e8d46c0f12e6 87076:9b97b187c7e2
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 24
25 (provide 'em-unix) 25 ;;; Commentary:
26 26
27 (eval-when-compile (require 'esh-maint)) 27 ;; This file contains implementations of several UNIX command in Emacs
28 ;; Lisp, for several reasons:
29 ;;
30 ;; 1) it makes them available on all platforms where the Lisp
31 ;; functions used are available
32 ;;
33 ;; 2) it makes their functionality accessible and modified by the
34 ;; Lisp programmer.
35 ;;
36 ;; 3) it allows Eshell to refrain from having to invoke external
37 ;; processes for common operations.
38
39 ;;; Code:
40
28 (require 'eshell) 41 (require 'eshell)
29 42
30 (defgroup eshell-unix nil 43 (defgroup eshell-unix nil
31 "This module defines many of the more common UNIX utilities as 44 "This module defines many of the more common UNIX utilities as
32 aliases implemented in Lisp. These include mv, ln, cp, rm, etc. If 45 aliases implemented in Lisp. These include mv, ln, cp, rm, etc. If
38 \(such as being able to use `kill' to kill Eshell background processes 51 \(such as being able to use `kill' to kill Eshell background processes
39 by name)." 52 by name)."
40 :tag "UNIX commands in Lisp" 53 :tag "UNIX commands in Lisp"
41 :group 'eshell-module) 54 :group 'eshell-module)
42 55
43 ;;; Commentary:
44
45 ;; This file contains implementations of several UNIX command in Emacs
46 ;; Lisp, for several reasons:
47 ;;
48 ;; 1) it makes them available on all platforms where the Lisp
49 ;; functions used are available
50 ;;
51 ;; 2) it makes their functionality accessible and modified by the
52 ;; Lisp programmer.
53 ;;
54 ;; 3) it allows Eshell to refrain from having to invoke external
55 ;; processes for common operations.
56
57 (defcustom eshell-unix-load-hook '(eshell-unix-initialize) 56 (defcustom eshell-unix-load-hook '(eshell-unix-initialize)
58 "*A list of functions to run when `eshell-unix' is loaded." 57 "*A list of functions to run when `eshell-unix' is loaded."
59 :type 'hook 58 :type 'hook
60 :group 'eshell-unix) 59 :group 'eshell-unix)
61 60
134 (defcustom eshell-du-prefer-over-ange nil 133 (defcustom eshell-du-prefer-over-ange nil
135 "*Use Eshell's du in ange-ftp remote directories. 134 "*Use Eshell's du in ange-ftp remote directories.
136 Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." 135 Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
137 :type 'boolean 136 :type 'boolean
138 :group 'eshell-unix) 137 :group 'eshell-unix)
139
140 (require 'esh-opt)
141 138
142 ;;; Functions: 139 ;;; Functions:
143 140
144 (defun eshell-unix-initialize () 141 (defun eshell-unix-initialize ()
145 "Initialize the UNIX support/emulation code." 142 "Initialize the UNIX support/emulation code."
1048 (error "usage: occur: (REGEXP &optional NLINES)") 1045 (error "usage: occur: (REGEXP &optional NLINES)")
1049 (apply 'occur args)))) 1046 (apply 'occur args))))
1050 1047
1051 (put 'eshell/occur 'eshell-no-numeric-conversions t) 1048 (put 'eshell/occur 'eshell-no-numeric-conversions t)
1052 1049
1053 ;;; Code: 1050 (provide 'em-unix)
1054 1051
1055 ;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9 1052 ;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9
1056 ;;; em-unix.el ends here 1053 ;;; em-unix.el ends here