changeset 86416:b8c6722b2727

Remove leading `*' from defcustom doc-strings. (esh-mode): Require it. (esh-util): Use require rather than featurep and load. (eshell): No need to test if eshell-mode is bound; remove obsolete reference to eshell-auto. (eshell-command, eshell-command-result): Don't require esh-mode now that the file does. (top-level): Move provide statement to the end of the file. Re-order and update commentary.
author Glenn Morris <rgm@gnu.org>
date Sat, 24 Nov 2007 21:14:57 +0000
parents 404f9a9c5f6c
children ade18e811234
files lisp/eshell/eshell.el
diffstat 1 files changed, 25 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/eshell/eshell.el	Sat Nov 24 20:19:23 2007 +0000
+++ b/lisp/eshell/eshell.el	Sat Nov 24 21:14:57 2007 +0000
@@ -24,21 +24,6 @@
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'eshell)
-
-(eval-when-compile (require 'esh-maint))
-
-(defgroup eshell nil
-  "Eshell is a command shell implemented entirely in Emacs Lisp.  It
-invokes no external processes beyond those requested by the user.  It
-is intended to be a functional replacement for command shells such as
-bash, zsh, rc, 4dos; since Emacs itself is capable of handling most of
-the tasks accomplished by such tools."
-  :tag "The Emacs shell"
-  :link '(info-link "(eshell)Top")
-  :version "21.1"
-  :group 'applications)
-
 ;;; Commentary:
 
 ;;;_* What does Eshell offer you?
@@ -73,33 +58,9 @@
 ;; @ Alias functions, both Lisp and Eshell-syntax
 ;; @ Piping, sequenced commands, background jobs, etc...
 ;;
-;;;_* Eshell is free software
-;;
-;; Eshell 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.
-;;
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with Eshell; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-;; MA 02110-1301, USA.
-;;
 ;;;_* How to begin
 ;;
-;; To start using Eshell, add the following to your .emacs file:
-;;
-;;   (load "eshell-auto")
-;;
-;; This will define all of the necessary autoloads.
-;;
-;; Now type `M-x eshell'.  See the INSTALL file for full installation
-;; instructions.
+;; To start using Eshell, simply type `M-x eshell'.
 ;;
 ;;;_* Philosophy
 ;;
@@ -263,13 +224,26 @@
 ;; will only have to read in this one file, which will greatly speed
 ;; things up.
 
+(require 'esh-mode)
+(require 'esh-util)
+(eval-when-compile (require 'esh-maint))
+
+(defgroup eshell nil
+  "Eshell is a command shell implemented entirely in Emacs Lisp.  It
+invokes no external processes beyond those requested by the user.  It
+is intended to be a functional replacement for command shells such as
+bash, zsh, rc, 4dos; since Emacs itself is capable of handling most of
+the tasks accomplished by such tools."
+  :tag "The Emacs shell"
+  :link '(info-link "(eshell)Top")
+  :version "21.1"
+  :group 'applications)
+
+
 ;;;_* User Options
 ;;
 ;; The following user options modify the behavior of Eshell overall.
 
-(unless (featurep 'esh-util)
-  (load "esh-util" nil t))
-
 (defsubst eshell-add-to-window-buffer-names ()
   "Add `eshell-buffer-name' to `same-window-buffer-names'."
   (add-to-list 'same-window-buffer-names eshell-buffer-name))
@@ -280,19 +254,19 @@
 	(delete eshell-buffer-name same-window-buffer-names)))
 
 (defcustom eshell-load-hook nil
-  "*A hook run once Eshell has been loaded."
+  "A hook run once Eshell has been loaded."
   :type 'hook
   :group 'eshell)
 
 (defcustom eshell-unload-hook
   '(eshell-remove-from-window-buffer-names
     eshell-unload-all-modules)
-  "*A hook run when Eshell is unloaded from memory."
+  "A hook run when Eshell is unloaded from memory."
   :type 'hook
   :group 'eshell)
 
 (defcustom eshell-buffer-name "*eshell*"
-  "*The basename used for Eshell buffers."
+  "The basename used for Eshell buffers."
   :set (lambda (symbol value)
 	 ;; remove the old value of `eshell-buffer-name', if present
 	 (if (boundp 'eshell-buffer-name)
@@ -309,7 +283,7 @@
   (member eshell-buffer-name same-window-buffer-names))
 
 (defcustom eshell-directory-name (convert-standard-filename "~/.eshell/")
-  "*The directory where Eshell control files should be kept."
+  "The directory where Eshell control files should be kept."
   :type 'directory
   :group 'eshell)
 
@@ -356,10 +330,8 @@
     ;; `same-window-buffer-names', which is done when Eshell is loaded
     (assert (and buf (buffer-live-p buf)))
     (pop-to-buffer buf)
-    (if (fboundp 'eshell-mode)
-	(unless (eq major-mode 'eshell-mode)
-	  (eshell-mode))
-      (error "`eshell-auto' must be loaded before Eshell can be used"))
+    (unless (eq major-mode 'eshell-mode)
+      (eshell-mode))
     buf))
 
 (defun eshell-return-exits-minibuffer ()
@@ -406,7 +378,6 @@
 		    (format " >>> #<buffer %s>"
 			    (buffer-name (current-buffer))))))
   (save-excursion
-    (require 'esh-mode)
     (let ((buf (set-buffer (generate-new-buffer " *eshell cmd*")))
 	  (eshell-non-interactive-p t))
       (eshell-mode)
@@ -465,7 +436,6 @@
        (if (and status-var (symbolp status-var))
 	   (set status-var 0)))
     (with-temp-buffer
-      (require 'esh-mode)
       (let ((eshell-non-interactive-p t))
 	(eshell-mode)
 	(let ((result (eshell-do-eval
@@ -543,5 +513,7 @@
 
 (run-hooks 'eshell-load-hook)
 
+(provide 'eshell)
+
 ;;; arch-tag: 9d4d5214-0e4e-4e02-b349-39add640d63f
 ;;; eshell.el ends here