summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog22
-rw-r--r--lisp/eshell/em-alias.el2
-rw-r--r--lisp/eshell/em-banner.el6
-rw-r--r--lisp/eshell/em-basic.el4
-rw-r--r--lisp/eshell/em-cmpl.el4
-rw-r--r--lisp/eshell/em-glob.el2
-rw-r--r--lisp/eshell/em-pred.el2
-rw-r--r--lisp/eshell/em-prompt.el1
-rw-r--r--lisp/eshell/em-rebind.el1
-rw-r--r--lisp/eshell/em-smart.el1
-rw-r--r--lisp/eshell/em-term.el2
-rw-r--r--lisp/eshell/em-tramp.el6
-rw-r--r--lisp/eshell/em-xtra.el3
-rw-r--r--lisp/eshell/esh-arg.el2
-rw-r--r--lisp/eshell/esh-ext.el8
-rw-r--r--lisp/eshell/esh-io.el8
-rw-r--r--lisp/eshell/esh-mode.el2
-rw-r--r--lisp/eshell/esh-opt.el2
-rw-r--r--lisp/eshell/esh-proc.el4
-rw-r--r--lisp/eshell/esh-util.el10
-rw-r--r--lisp/eshell/esh-var.el8
-rw-r--r--lisp/eshell/eshell.el8
22 files changed, 78 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0f3c16101d3..51f07c517af 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,27 @@
2013-05-23 Glenn Morris <rgm@gnu.org>
+ * eshell/em-tramp.el: Adjust requires.
+ (eshell-parse-command): Autoload.
+ * eshell/em-xtra.el: Adjust requires.
+ (eshell-parse-command): Autoload.
+ * eshell/esh-ext.el: Adjust requires.
+ (eshell-parse-command, eshell-close-handles): Autoload.
+ * eshell/esh-io.el: Adjust requires.
+ (eshell-output-filter): Autoload.
+ * eshell/esh-util.el: No need to load tramp when compiling.
+ (tramp-file-name-structure, ange-ftp-ls, ange-ftp-file-modtime):
+ Declare.
+ (eshell-parse-ange-ls): Require ange-ftp and tramp.
+ * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el:
+ * eshell/em-cmpl.el, eshell/em-glob.el, eshell/em-pred.el:
+ * eshell/em-prompt.el, eshell/em-rebind.el, eshell/em-smart.el:
+ * eshell/em-term.el, eshell/esh-arg.el, eshell/esh-mode.el:
+ * eshell/esh-opt.el, eshell/esh-proc.el:
+ * eshell/esh-var.el: Adjust requires.
+ * eshell/eshell.el: Do not require esh-util twice.
+ (eshell-add-input-to-history): Declare.
+ (eshell-command): Check history module is active before using it.
+
* eshell/em-ls.el (eshell-ls-dir): Fix -A handling.
2013-05-22 Leo Liu <sdl.web@gmail.com>
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index aa89177c2de..a46b48c01b3 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -90,8 +90,6 @@
;;; Code:
-(eval-when-compile
- (require 'esh-util))
(require 'eshell)
;;;###autoload
diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el
index 44928b14e11..8c3eebf3510 100644
--- a/lisp/eshell/em-banner.el
+++ b/lisp/eshell/em-banner.el
@@ -39,11 +39,11 @@
;;; Code:
(eval-when-compile
- (require 'cl-lib)
- (require 'esh-mode)
- (require 'eshell))
+ (require 'cl-lib))
(require 'esh-util)
+(require 'esh-mode)
+(require 'eshell)
;;;###autoload
(progn
diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el
index d795b8226ca..c440bd0a928 100644
--- a/lisp/eshell/em-basic.el
+++ b/lisp/eshell/em-basic.el
@@ -59,9 +59,7 @@
;;; Code:
-(eval-when-compile
- (require 'esh-util))
-
+(require 'esh-util)
(require 'eshell)
(require 'esh-opt)
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 4f4b8dd3276..426db3232ed 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -70,10 +70,12 @@
;;; Code:
(require 'pcomplete)
+(require 'esh-mode)
+(require 'esh-util)
+
(eval-when-compile
(require 'cl-lib)
(require 'eshell))
-(require 'esh-util)
;;;###autoload
(progn
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index 866412d252b..a58c7730ded 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -49,8 +49,8 @@
;;; Code:
-(eval-when-compile (require 'eshell))
(require 'esh-util)
+(eval-when-compile (require 'eshell))
;;;###autoload
(progn
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el
index 13bdb2e4a03..3a7f46ebe83 100644
--- a/lisp/eshell/em-pred.el
+++ b/lisp/eshell/em-pred.el
@@ -46,6 +46,8 @@
;;; Code:
+(require 'esh-util)
+(require 'esh-arg)
(eval-when-compile (require 'eshell))
;;;###autoload
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index c5429c59bd6..18731121c4e 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -26,6 +26,7 @@
;;; Code:
+(require 'esh-mode)
(eval-when-compile (require 'eshell))
;;;###autoload
diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el
index 42a5c36cab3..341191fc62f 100644
--- a/lisp/eshell/em-rebind.el
+++ b/lisp/eshell/em-rebind.el
@@ -23,6 +23,7 @@
;;; Code:
+(require 'esh-mode)
(eval-when-compile (require 'eshell))
;;;###autoload
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el
index de244a2fb88..aa9038aafb9 100644
--- a/lisp/eshell/em-smart.el
+++ b/lisp/eshell/em-smart.el
@@ -68,6 +68,7 @@
;;; Code:
+(require 'esh-mode)
(eval-when-compile (require 'eshell))
;;;###autoload
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el
index e659bce0568..e5360f2deb4 100644
--- a/lisp/eshell/em-term.el
+++ b/lisp/eshell/em-term.el
@@ -31,6 +31,8 @@
;;; Code:
+(require 'esh-util)
+(require 'esh-ext)
(eval-when-compile (require 'eshell))
(require 'term)
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el
index c60d0e6395f..fb816b76a7d 100644
--- a/lisp/eshell/em-tramp.el
+++ b/lisp/eshell/em-tramp.el
@@ -25,13 +25,13 @@
;;; Code:
+(require 'esh-util)
+
(eval-when-compile
(require 'esh-mode)
(require 'eshell)
(require 'tramp))
-(require 'esh-util)
-
;;;###autoload
(progn
(defgroup eshell-tramp nil
@@ -53,6 +53,8 @@
(append '("su" "sudo")
eshell-complex-commands)))
+(autoload 'eshell-parse-command "esh-cmd")
+
(defun eshell/su (&rest args)
"Alias \"su\" to call TRAMP.
diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el
index 7c559772dd3..c4cab522cf2 100644
--- a/lisp/eshell/em-xtra.el
+++ b/lisp/eshell/em-xtra.el
@@ -23,6 +23,7 @@
;;; Code:
+(require 'esh-util)
(eval-when-compile
(require 'eshell)
(require 'pcomplete))
@@ -40,6 +41,8 @@ naturally accessible within Emacs."
;;; Functions:
+(autoload 'eshell-parse-command "esh-cmd")
+
(defun eshell/expr (&rest args)
"Implementation of expr, using the calc package."
(if (not (fboundp 'calc-eval))
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el
index 73f7fc557e5..d7dfd27d8d3 100644
--- a/lisp/eshell/esh-arg.el
+++ b/lisp/eshell/esh-arg.el
@@ -27,7 +27,7 @@
(provide 'esh-arg)
-(eval-when-compile (require 'eshell))
+(require 'esh-mode)
(defgroup eshell-arg nil
"Argument parsing involves transforming the arguments passed on the
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index 3fe48b26e27..c4e4c000bda 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -33,10 +33,12 @@
(provide 'esh-ext)
+(require 'esh-util)
+
(eval-when-compile
(require 'cl-lib)
+ (require 'esh-io)
(require 'esh-cmd))
-(require 'esh-util)
(require 'esh-opt)
(defgroup eshell-ext nil
@@ -103,6 +105,8 @@ wholly ignored."
:type '(choice file (const nil))
:group 'eshell-ext)
+(autoload 'eshell-parse-command "esh-cmd")
+
(defsubst eshell-invoke-batch-file (&rest args)
"Invoke a .BAT or .CMD file on DOS/Windows systems."
;; since CMD.EXE can't handle forward slashes in the initial
@@ -179,6 +183,8 @@ This bypasses all Lisp functions and aliases."
(error "%s: external command not found"
(substring command 1))))))
+(autoload 'eshell-close-handles "esh-io")
+
(defun eshell-remote-command (command args)
"Insert output from a remote COMMAND, using ARGS.
A remote command is something that executes on a different machine.
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 66172c8f662..4edb47e4758 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -58,9 +58,11 @@
(provide 'esh-io)
+(require 'esh-arg)
+(require 'esh-util)
+
(eval-when-compile
- (require 'cl-lib)
- (require 'eshell))
+ (require 'cl-lib))
(defgroup eshell-io nil
"Eshell's I/O management code provides a scheme for treating many
@@ -465,6 +467,8 @@ after all printing is over with no argument."
(eshell-print object)
(eshell-print "\n"))
+(autoload 'eshell-output-filter "esh-mode")
+
(defun eshell-output-object-to-target (object target)
"Insert OBJECT into TARGET.
Returns what was actually sent, or nil if nothing was sent."
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index c22d7c16e98..ee857cf20f3 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -60,7 +60,7 @@
(provide 'esh-mode)
-(eval-when-compile (require 'esh-util))
+(require 'esh-util)
(require 'esh-module)
(require 'esh-cmd)
(require 'esh-io)
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el
index 6a37f97bf20..33625433022 100644
--- a/lisp/eshell/esh-opt.el
+++ b/lisp/eshell/esh-opt.el
@@ -25,7 +25,7 @@
(provide 'esh-opt)
-(eval-when-compile (require 'esh-ext))
+(require 'esh-ext)
;; Unused.
;;; (defgroup eshell-opt nil
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index aa630dc87aa..171d70c0772 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -25,9 +25,7 @@
(provide 'esh-proc)
-(eval-when-compile
- (require 'eshell)
- (require 'esh-util))
+(require 'esh-cmd)
(defgroup eshell-proc nil
"When Eshell invokes external commands, it always does so
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index f9b86219e9b..dd344eb50a2 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -605,10 +605,16 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
(autoload 'parse-time-string "parse-time"))
(eval-when-compile
- (require 'ange-ftp nil t)
- (require 'tramp nil t))
+ (require 'ange-ftp nil t)) ; ange-ftp-parse-filename
+
+(defvar tramp-file-name-structure)
+(declare-function ange-ftp-ls "ange-ftp"
+ (file lsargs parse &optional no-error wildcard))
+(declare-function ange-ftp-file-modtime "ange-ftp" (file))
(defun eshell-parse-ange-ls (dir)
+ (require 'ange-ftp)
+ (require 'tramp)
(let ((ange-ftp-name-format
(list (nth 0 tramp-file-name-structure)
(nth 3 tramp-file-name-structure)
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 06858c5b986..188b8165248 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -107,11 +107,11 @@
(provide 'esh-var)
-(eval-when-compile
- (require 'pcomplete)
- (require 'esh-util)
- (require 'esh-mode))
+(require 'esh-util)
+(require 'esh-cmd)
(require 'esh-opt)
+
+(require 'pcomplete)
(require 'env)
(require 'ring)
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index a76adb1fd94..9bdf8b3eb68 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -222,8 +222,7 @@
;; things up.
(eval-when-compile
- (require 'cl-lib)
- (require 'esh-util))
+ (require 'cl-lib))
(require 'esh-util)
(require 'esh-mode)
@@ -318,6 +317,8 @@ buffer selected (or created)."
Modules should use this variable so that they don't clutter
non-interactive sessions, such as when using `eshell-command'.")
+(declare-function eshell-add-input-to-history "em-hist" (input))
+
;;;###autoload
(defun eshell-command (&optional command arg)
"Execute the Eshell command string COMMAND.
@@ -333,7 +334,8 @@ With prefix ARG, insert output into the current buffer at point."
(eshell-return-exits-minibuffer))
(unless command
(setq command (read-from-minibuffer "Emacs shell command: "))
- (eshell-add-input-to-history command))))
+ (if (eshell-using-module 'eshell-hist)
+ (eshell-add-input-to-history command)))))
(unless command
(error "No command specified!"))
;; redirection into the current buffer is achieved by adding an