]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-unix.el
Add 2009 to copyright years.
[gnu-emacs] / lisp / eshell / em-unix.el
index 33514d515afe1f1a66b63794a7f9e83f3609792a..38be63275be6fbeea0976b081513616ebcf1b9ab 100644 (file)
@@ -1,16 +1,16 @@
 ;;; em-unix.el --- UNIX command aliases
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; GNU General Public License for more details.
 
 ;; 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., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-(provide 'em-unix)
+;;; Commentary:
+
+;; This file contains implementations of several UNIX command in Emacs
+;; Lisp, for several reasons:
+;;
+;;   1) it makes them available on all platforms where the Lisp
+;;      functions used are available
+;;
+;;   2) it makes their functionality accessible and modified by the
+;;      Lisp programmer.
+;;
+;;   3) it allows Eshell to refrain from having to invoke external
+;;      processes for common operations.
+
+;;; Code:
 
-(eval-when-compile (require 'esh-maint))
 (require 'eshell)
 
-(defgroup eshell-unix nil
+;;;###autoload
+(eshell-defgroup eshell-unix nil
   "This module defines many of the more common UNIX utilities as
 aliases implemented in Lisp.  These include mv, ln, cp, rm, etc.  If
 the user passes arguments which are too complex, or are unrecognized
@@ -40,20 +52,6 @@ by name)."
   :tag "UNIX commands in Lisp"
   :group 'eshell-module)
 
-;;; Commentary:
-
-;; This file contains implementations of several UNIX command in Emacs
-;; Lisp, for several reasons:
-;;
-;;   1) it makes them available on all platforms where the Lisp
-;;      functions used are available
-;;
-;;   2) it makes their functionality accessible and modified by the
-;;      Lisp programmer.
-;;
-;;   3) it allows Eshell to refrain from having to invoke external
-;;      processes for common operations.
-
 (defcustom eshell-unix-load-hook '(eshell-unix-initialize)
   "*A list of functions to run when `eshell-unix' is loaded."
   :type 'hook
@@ -78,7 +76,7 @@ receiving side of a command pipeline."
   :type 'boolean
   :group 'eshell-unix)
 
-(defcustom eshell-plain-locate-behavior (eshell-under-xemacs-p)
+(defcustom eshell-plain-locate-behavior (featurep 'xemacs)
   "*If non-nil, standalone \"locate\" commands will behave normally.
 Standalone in this context means not redirected, and not on the
 receiving side of a command pipeline."
@@ -137,8 +135,6 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
   :type 'boolean
   :group 'eshell-unix)
 
-(require 'esh-opt)
-
 ;;; Functions:
 
 (defun eshell-unix-initialize ()
@@ -156,11 +152,10 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
 (defalias 'eshell/basename 'file-name-nondirectory)
 (defalias 'eshell/dirname  'file-name-directory)
 
-(eval-when-compile
-  (defvar interactive)
-  (defvar preview)
-  (defvar recursive)
-  (defvar verbose))
+(defvar interactive)
+(defvar preview)
+(defvar recursive)
+(defvar verbose)
 
 (defun eshell/man (&rest args)
   "Invoke man, flattening the arguments appropriately."
@@ -169,7 +164,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
 (put 'eshell/man 'eshell-no-numeric-conversions t)
 
 (defun eshell/info (&rest args)
-  "Runs the info command in-frame with the same behaviour as command-line `info', ie:
+  "Run the info command in-frame with the same behavior as command-line `info', ie:
   'info'           => goes to top info window
   'info arg1'      => IF arg1 is a file, then visits arg1
   'info arg1'      => OTHERWISE goes to top info window and then menu item arg1
@@ -341,10 +336,9 @@ Remove the DIRECTORY(ies), if they are empty.")
 
 (put 'eshell/rmdir 'eshell-no-numeric-conversions t)
 
-(eval-when-compile
-  (defvar no-dereference)
-  (defvar preview)
-  (defvar verbose))
+(defvar no-dereference)
+(defvar preview)
+(defvar verbose)
 
 (defvar eshell-warn-dot-directories t)
 
@@ -807,15 +801,14 @@ external command."
 
 (defalias 'pcomplete/ssh 'pcomplete/rsh)
 
-(eval-when-compile
-  (defvar block-size)
-  (defvar by-bytes)
-  (defvar dereference-links)
-  (defvar grand-total)
-  (defvar human-readable)
-  (defvar max-depth)
-  (defvar only-one-filesystem)
-  (defvar show-all))
+(defvar block-size)
+(defvar by-bytes)
+(defvar dereference-links)
+(defvar grand-total)
+(defvar human-readable)
+(defvar max-depth)
+(defvar only-one-filesystem)
+(defvar show-all)
 
 (defsubst eshell-du-size-string (size)
   (let* ((str (eshell-printable-size size human-readable block-size t))
@@ -1050,7 +1043,11 @@ Show wall-clock time elapsed during execution of COMMAND.")
 
 (put 'eshell/occur 'eshell-no-numeric-conversions t)
 
-;;; Code:
+(provide 'em-unix)
+
+;; Local Variables:
+;; generated-autoload-file: "esh-groups.el"
+;; End:
 
-;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9
+;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9
 ;;; em-unix.el ends here