]> git.eshelyaron.com Git - emacs.git/commitdiff
Require individual files if needed when compiling, rather than
authorGlenn Morris <rgm@gnu.org>
Wed, 5 Dec 2007 07:03:18 +0000 (07:03 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 5 Dec 2007 07:03:18 +0000 (07:03 +0000)
esh-maint.  Collect any require statements.  Move provide statement to
end.  Move any commentary to start.

13 files changed:
lisp/eshell/em-cmpl.el
lisp/eshell/em-dirs.el
lisp/eshell/em-glob.el
lisp/eshell/em-hist.el
lisp/eshell/em-ls.el
lisp/eshell/em-pred.el
lisp/eshell/em-prompt.el
lisp/eshell/em-rebind.el
lisp/eshell/em-script.el
lisp/eshell/em-smart.el
lisp/eshell/em-term.el
lisp/eshell/em-unix.el
lisp/eshell/em-xtra.el

index 8672885cc600828778ac69e87a2d014f93fc03d8..b5f666a6bf6ac78fc13c600cbff6dc8f96b8e8b0 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-cmpl)
-
-(eval-when-compile (require 'esh-maint))
-(require 'esh-util)
-
-(defgroup eshell-cmpl nil
-  "This module provides a programmable completion function bound to
-the TAB key, which allows for completing command names, file names,
-variable names, arguments, etc."
-  :tag "Argument completion"
-  :group 'eshell-module)
-
 ;;; Commentary:
 
 ;; Eshell, by using the pcomplete package, provides a full
@@ -82,6 +70,19 @@ variable names, arguments, etc."
 ;; This only works well if the completion function has provided Eshell
 ;; with sufficient pointers to locate the relevant help text.
 
+;;; Code:
+
+(eval-when-compile
+  (require 'eshell))
+(require 'esh-util)
+
+(defgroup eshell-cmpl nil
+  "This module provides a programmable completion function bound to
+the TAB key, which allows for completing command names, file names,
+variable names, arguments, etc."
+  :tag "Argument completion"
+  :group 'eshell-module)
+
 ;;; User Variables:
 
 (defcustom eshell-cmpl-load-hook '(eshell-cmpl-initialize)
@@ -448,7 +449,7 @@ to writing a completion function."
                        (all-completions filename obarray 'functionp))
                   completions)))))))
 
-;;; Code:
+(provide 'em-cmpl)
 
 ;;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc
 ;;; em-cmpl.el ends here
index 02556661b1b5a15a04045432d308d716b861cbfa..8a1e81621bc82676afcdc64bca3b81f92a2a6b18 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-dirs)
-
-(eval-when-compile (require 'esh-maint))
-(require 'eshell)
-
-(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)
-
 ;;; Commentary:
 
 ;; The only special feature that Eshell offers in the last-dir-ring.
@@ -57,9 +43,21 @@ they lack somewhat in feel from the typical shell equivalents."
 ;; Eshell sessions.  It is a separate mechanism from `pushd' and
 ;; `popd', and the two may be used at the same time.
 
+;;; Code:
+
+(require 'eshell)
 (require 'ring)
 (require 'esh-opt)
 
+(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)
+
 ;;; User Variables:
 
 (defcustom eshell-dirs-load-hook '(eshell-dirs-initialize)
@@ -566,7 +564,7 @@ in the minibuffer:
           (write-region (point-min) (point-max) file nil
                         'no-message))))))))
 
-;;; Code:
+(provide 'em-dirs)
 
 ;;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787
 ;;; em-dirs.el ends here
index 2e95aaefae0e822d40102b7b23bd0ac3587842f7..b08ddd77e196512ecc5a1c7f6cd35f19e4cc6c0d 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-;;; Code:
-
-(provide 'em-glob)
-
-(eval-when-compile (require 'esh-maint))
-(require 'esh-util)
-
-(defgroup eshell-glob nil
-  "This module provides extended globbing syntax, similar what is used
-by zsh for filename generation."
-  :tag "Extended filename globbing"
-  :group 'eshell-module)
-
 ;;; Commentary:
 
 ;; The globbing code used by Eshell closely follows the syntax used by
@@ -63,6 +50,17 @@ by zsh for filename generation."
 ;; owned by the user 'johnw'.  See [Value modifiers and predicates],
 ;; for more information about argument predication.
 
+;;; Code:
+
+(eval-when-compile (require 'eshell))
+(require 'esh-util)
+
+(defgroup eshell-glob nil
+  "This module provides extended globbing syntax, similar what is used
+by zsh for filename generation."
+  :tag "Extended filename globbing"
+  :group 'eshell-module)
+
 ;;; User Variables:
 
 (defcustom eshell-glob-load-hook '(eshell-glob-initialize)
@@ -356,5 +354,7 @@ the form:
       (eshell-glob-entries (car rdirs) globs recurse-p)
       (setq rdirs (cdr rdirs)))))
 
+(provide 'em-glob)
+
 ;;; arch-tag: d0548f54-fb7c-4978-a88e-f7c26f7f68ca
 ;;; em-glob.el ends here
index 88e154239561e134bdeaf70d6fa45ffac1dbfa43..2dd2b31d34a6518b63173d1c98de2dd42980dcb5 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-hist)
-
-(eval-when-compile (require 'esh-maint))
-(require 'eshell)
-
-(defgroup eshell-hist nil
-  "This module provides command history management."
-  :tag "History list management"
-  :group 'eshell-module)
-
 ;;; Commentary:
 
 ;; Eshell's history facility imitates the syntax used by bash
 (require 'ring)
 (require 'esh-opt)
 (require 'em-pred)
+(require 'eshell)
+
+(defgroup eshell-hist nil
+  "This module provides command history management."
+  :tag "History list management"
+  :group 'eshell-module)
 
 ;;; User Variables:
 
@@ -988,5 +984,7 @@ If N is negative, search backwards for the -Nth previous match."
   (isearch-done)
   (eshell-send-input))
 
+(provide 'em-hist)
+
 ;;; arch-tag: 1a847333-f864-4b96-9acd-b549d620b6c6
 ;;; em-hist.el ends here
index d6b4f3aed29b8ddafd6b46893eca24c2b9bb0654..01a6bb87a1f7963011b2ed9928c54154ceb8b1d2 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-ls)
+;;; Commentary:
+
+;; Most of the command switches recognized by GNU's ls utility are
+;; supported ([(fileutils)ls invocation]).
 
-(eval-when-compile (require 'esh-maint))
+;;; Code:
+
+(eval-when-compile (require 'eshell))
+(require 'esh-util)
+(require 'esh-opt)
 
 (defgroup eshell-ls nil
   "This module implements the \"ls\" utility fully in Lisp.  If it is
@@ -35,14 +42,6 @@ properties to colorize its output based on the setting of
   :tag "Implementation of `ls' in Lisp"
   :group 'eshell-module)
 
-;;; Commentary:
-
-;; Most of the command switches recognized by GNU's ls utility are
-;; supported ([(fileutils)ls invocation]).
-
-(require 'esh-util)
-(require 'esh-opt)
-
 ;;; User Variables:
 
 (defvar eshell-ls-orig-insert-directory
@@ -922,7 +921,7 @@ to use, and each member of which is the width of that column
                                 (car file)))))
   (car file))
 
-;;; Code:
+(provide 'em-ls)
 
 ;;; arch-tag: 9295181c-0cb2-499c-999b-89f5359842cb
 ;;; em-ls.el ends here
index a7f68e4e222d3d475c1ecc54dc8a2174e11a27e9..628b8b611435cf19e36ad9c06b4ad5db4465c24c 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-pred)
-
-(eval-when-compile (require 'esh-maint))
-
-(defgroup eshell-pred nil
-  "This module allows for predicates to be applied to globbing
-patterns (similar to zsh), in addition to string modifiers which can
-be applied either to globbing results, variable references, or just
-ordinary strings."
-  :tag "Value modifiers and predicates"
-  :group 'eshell-module)
-
 ;;; Commentary:
 
 ;; Argument predication is used to affect which members of a list are
@@ -61,6 +49,16 @@ ordinary strings."
 
 ;;; Code:
 
+(eval-when-compile (require 'eshell))
+
+(defgroup eshell-pred nil
+  "This module allows for predicates to be applied to globbing
+patterns (similar to zsh), in addition to string modifiers which can
+be applied either to globbing results, variable references, or just
+ordinary strings."
+  :tag "Value modifiers and predicates"
+  :group 'eshell-module)
+
 ;;; User Variables:
 
 (defcustom eshell-pred-load-hook '(eshell-pred-initialize)
@@ -602,5 +600,7 @@ that 'ls -l' will show in the first column of its display. "
         (lambda (str)
           (split-string str ,sep))) lst))))
 
+(provide 'em-pred)
+
 ;;; arch-tag: 8b5ce022-17f3-4c40-93c7-5faafaa63f31
 ;;; em-pred.el ends here
index ddbf74f5c42da1bea7d95cdd38b61e3076c22331..57a1da7417713410cdd138bcaa98739b9d2f77cc 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-prompt)
+;;; Commentary:
+
+;; Most of the prompt navigation commands of `comint-mode' are
+;; supported, such as C-c C-n, C-c C-p, etc.
+
+;;; Code:
 
-(eval-when-compile (require 'esh-maint))
+(eval-when-compile (require 'eshell))
 
 (defgroup eshell-prompt nil
   "This module provides command prompts, and navigation between them,
@@ -32,11 +37,6 @@ as is common with most shells."
   :tag "Command prompts"
   :group 'eshell-module)
 
-;;; Commentary:
-
-;; Most of the prompt navigation commands of `comint-mode' are
-;; supported, such as C-c C-n, C-c C-p, etc.
-
 ;;; User Variables:
 
 (defcustom eshell-prompt-load-hook '(eshell-prompt-initialize)
@@ -173,7 +173,7 @@ If this takes us past the end of the current line, don't skip at all."
             (<= (match-end 0) eol))
        (goto-char (match-end 0)))))
 
-;;; Code:
+(provide 'em-prompt)
 
 ;;; arch-tag: 01c1574b-ce70-4e89-bc38-e6619f61e208
 ;;; em-prompt.el ends here
index 898f0b9d301f62873048c787ff2548efc506ecd0..b550016fbe1de43b962201c60a85f0796d254c2c 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-rebind)
+;;; Commentary:
+
+;;; Code:
 
-(eval-when-compile (require 'esh-maint))
+(eval-when-compile (require 'eshell))
 
 (defgroup eshell-rebind nil
   "This module allows for special keybindings that only take effect
@@ -39,8 +41,6 @@ the behavior of normal shells while the user editing new input text."
   :tag "Rebind keys at input"
   :group 'eshell-module)
 
-;;; Commentary:
-
 ;;; User Variables:
 
 (defcustom eshell-rebind-load-hook '(eshell-rebind-initialize)
@@ -242,7 +242,7 @@ input."
          (eshell-life-is-too-much)))
       (eshell-delete-backward-char (- arg)))))
 
-;;; Code:
+(provide 'em-rebind)
 
 ;;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530
 ;;; em-rebind.el ends here
index 50fdc3cccccec193ba66ac540ea3c00cab613a89..0a83881c03f9893943961c75dd062be57eae293d 100644 (file)
@@ -22,9 +22,9 @@
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-script)
+;;; Commentary:
 
-(eval-when-compile (require 'esh-maint))
+;;; Code:
 
 (require 'eshell)
 
@@ -34,8 +34,6 @@ commands, as a script file."
   :tag "Running script files."
   :group 'eshell-module)
 
-;;; Commentary:
-
 ;;; User Variables:
 
 (defcustom eshell-script-load-hook '(eshell-script-initialize)
@@ -137,7 +135,7 @@ environment, binding ARGS to $1, $2, etc.")
 
 (put 'eshell/. 'eshell-no-numeric-conversions t)
 
-;;; Code:
+(provide 'em-script)
 
 ;;; arch-tag: a346439d-5ba8-4faf-ac2b-3aacfeaa4647
 ;;; em-script.el ends here
index f99a64bd17d6758e9b86094dc866881de09da230..ffb1b4a4d92d55d09bbce01665f07aedbb9c2d83 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-smart)
-
-(eval-when-compile (require 'esh-maint))
-
-(defgroup eshell-smart nil
-  "This module combines the facility of normal, modern shells with
-some of the edit/review concepts inherent in the design of Plan 9's
-9term.  See the docs for more details.
-
-Most likely you will have to turn this option on and play around with
-it to get a real sense of how it works."
-  :tag "Smart display of output"
-  ;; :link '(info-link "(eshell)Smart display of output")
-  :group 'eshell-module)
-
 ;;; Commentary:
 
 ;; The best way to get a sense of what this code is trying to do is by
@@ -84,6 +69,21 @@ it to get a real sense of how it works."
 ;; (such as pwd), where the screen is mostly full, consumption can
 ;; increase by orders of magnitude.
 
+;;; Code:
+
+(eval-when-compile (require 'eshell))
+
+(defgroup eshell-smart nil
+  "This module combines the facility of normal, modern shells with
+some of the edit/review concepts inherent in the design of Plan 9's
+9term.  See the docs for more details.
+
+Most likely you will have to turn this option on and play around with
+it to get a real sense of how it works."
+  :tag "Smart display of output"
+  ;; :link '(info-link "(eshell)Smart display of output")
+  :group 'eshell-module)
+
 ;;; User Variables:
 
 (defcustom eshell-smart-load-hook '(eshell-smart-initialize)
@@ -322,7 +322,7 @@ and the end of the buffer are still visible."
     (if clear
        (remove-hook 'pre-command-hook 'eshell-smart-display-move t))))
 
-;;; Code:
+(provide 'em-smart)
 
 ;;; arch-tag: 8c0112c7-379c-4d54-9a1c-204d68786a4b
 ;;; em-smart.el ends here
index 541773a4b5bf3ab14aef96474d82e9058e7c83ad..6ee698148da07db6c82ea56920f2431bbf7cf5e6 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-term)
-
-(eval-when-compile (require 'esh-maint))
-
-(defgroup eshell-term nil
-  "This module causes visual commands (e.g., 'vi') to be executed by
-the `term' package, which comes with Emacs.  This package handles most
-of the ANSI control codes, allowing curses-based applications to run
-within an Emacs window.  The variable `eshell-visual-commands' defines
-which commands are considered visual in nature."
-  :tag "Running visual commands"
-  :group 'eshell-module)
-
 ;;; Commentary:
 
 ;; At the moment, eshell is stream-based in its interactive input and
@@ -45,8 +32,20 @@ which commands are considered visual in nature."
 ;; buffer, giving the illusion that Eshell itself is allowing these
 ;; visual processes to execute.
 
+;;; Code:
+
+(eval-when-compile (require 'eshell))
 (require 'term)
 
+(defgroup eshell-term nil
+  "This module causes visual commands (e.g., 'vi') to be executed by
+the `term' package, which comes with Emacs.  This package handles most
+of the ANSI control codes, allowing curses-based applications to run
+within an Emacs window.  The variable `eshell-visual-commands' defines
+which commands are considered visual in nature."
+  :tag "Running visual commands"
+  :group 'eshell-module)
+
 ;;; User Variables:
 
 (defcustom eshell-term-load-hook '(eshell-term-initialize)
@@ -264,7 +263,7 @@ allowed."
 ;   "Switch to line (\"cooked\") sub-mode of eshell-term mode."
 ;  (use-local-map term-old-mode-map))
 
-;;; Code:
+(provide 'em-term)
 
 ;;; arch-tag: ab7c8fe4-3101-4257-925b-1354c6b2fe9d
 ;;; em-term.el ends here
index dc5ef908e56613eec6f6f5d52f73d80cc56a0e68..e970c87f501b102ace9ec8d0ec390f8ba3e9a671 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(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
@@ -40,20 +53,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
@@ -137,8 +136,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 ()
@@ -1050,7 +1047,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
 
 (put 'eshell/occur 'eshell-no-numeric-conversions t)
 
-;;; Code:
+(provide 'em-unix)
 
 ;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9
 ;;; em-unix.el ends here
index bd48afb6bd6c6d80ba1fb91b96f39b18d9021571..f0a92eb0c6040a16d782a2d7d4a17fd7f294686f 100644 (file)
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
 
-(provide 'em-xtra)
+;;; Commentary:
+
+;;; Code:
 
-(eval-when-compile (require 'esh-maint))
+(eval-when-compile
+  (require 'eshell)
+  (require 'pcomplete))
+(require 'compile)
 
 (defgroup eshell-xtra nil
   "This module defines some extra alias functions which are entirely
@@ -34,10 +39,6 @@ naturally accessible within Emacs."
   :tag "Extra alias functions"
   :group 'eshell-module)
 
-;;; Commentary:
-
-(require 'compile)
-
 ;;; Functions:
 
 (defun eshell/expr (&rest args)
@@ -117,7 +118,7 @@ naturally accessible within Emacs."
 
 (defalias 'pcomplete/bcc 'pcomplete/bcc32)
 
-;;; Code:
+(provide 'em-xtra)
 
 ;;; arch-tag: f944cfda-a118-470c-a0d6-b41a3a5c99c7
 ;;; em-xtra.el ends here