diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-04-08 14:28:34 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-04-08 14:28:34 -0400 |
commit | 0d5e83611e5157800fd855fe8e3f60c8eff0af7c (patch) | |
tree | 647b4c911934746d9cbd866f64a1e8f7579f6e30 /lisp/eshell/esh-opt.el | |
parent | a20845c160de2ba9f42b3af714d770df502d0577 (diff) | |
download | emacs-0d5e83611e5157800fd855fe8e3f60c8eff0af7c.tar.gz |
Eshell: Try to untangle the dependencies; move 'provide's to the end
* lisp/eshell/esh-arg.el: Move defsubst and vars before first use.
Don't require `esh-mode but esh-util instead.
* lisp/eshell/esh-cmd.el: Require esh-module and esh-io.
* lisp/eshell/esh-ext.el: Don't require esh-proc nor esh-cmd.
(eshell-external-command): Require esh-proc for
eshell-gather-process-output.
* lisp/eshell/esh-mode.el: Don't require esh-io nor esh-var, but
require esh-arg.
(eshell-directory-name): Move from eshell.el.
* lisp/eshell/esh-module.el: Don't require eshell.
* lisp/eshell/esh-opt.el: Don't require esh-ext at top-level.
(eshell--do-opts, eshell-show-usage): Require it here instead.
* lisp/eshell/esh-proc.el: Don't require esh-cmd, but require esh-io.
(eshell-reset-after-proc, eshell-record-process-object)
(eshell-gather-process-output, eshell-send-eof-to-process):
Require esh-mode and esh-var here.
* lisp/eshell/esh-var.el: Require esh-module, esh-arg, and esh-io.
* lisp/eshell/eshell.el: Require esh-module, esh-proc, esh-io, and esh-cmd.
But don't require esh-mode.
(eshell-directory-name): Move to esh-mode.
(eshell-return-exits-minibuffer): Don't bind 'return' and 'M-return'
since we already bind RET and M-RET.
Diffstat (limited to 'lisp/eshell/esh-opt.el')
-rw-r--r-- | lisp/eshell/esh-opt.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index a023a3c5d2e..5b2693283a7 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -23,9 +23,6 @@ ;;; Code: -(provide 'esh-opt) - -(require 'esh-ext) ;; Unused. ;; (defgroup eshell-opt nil @@ -127,6 +124,8 @@ let-bound variable `args'." (defun eshell--do-opts (name options args) "Helper function for `eshell-eval-using-options'. This code doesn't really need to be macro expanded everywhere." + (require 'esh-ext) + (declare-function eshell-external-command "esh-ext" (command args)) (let ((ext-command (catch 'eshell-ext-command (let ((usage-msg @@ -145,6 +144,8 @@ This code doesn't really need to be macro expanded everywhere." (defun eshell-show-usage (name options) "Display the usage message for NAME, using OPTIONS." + (require 'esh-ext) + (declare-function eshell-search-path "esh-ext" (name)) (let ((usage (format "usage: %s %s\n\n" name (cadr (memq ':usage options)))) (extcmd (memq ':external options)) @@ -273,4 +274,5 @@ switch is unrecognized." (setq index (1+ index)))))))) (nconc (mapcar #'cdr opt-vals) eshell--args))) +(provide 'esh-opt) ;;; esh-opt.el ends here |