Commit dbba8a04 authored by Glenn Morris's avatar Glenn Morris
Browse files

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.
parent 20d7538e
......@@ -22,18 +22,6 @@
;; 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
......@@ -22,20 +22,6 @@
;; 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
......@@ -22,19 +22,6 @@
;; 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
......@@ -22,16 +22,6 @@
;; 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
......@@ -70,6 +60,12 @@
(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
......@@ -22,9 +22,16 @@
;; 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
......@@ -22,18 +22,6 @@
;; 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
......@@ -22,9 +22,14 @@
;; 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
......@@ -22,9 +22,11 @@
;; 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
......@@ -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
......@@ -22,21 +22,6 @@
;; 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
......@@ -22,19 +22,6 @@
;; 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
......@@ -22,9 +22,22 @@
;; 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
......@@ -22,9 +22,14 @@
;; 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment