summaryrefslogtreecommitdiff
path: root/lisp/eshell/eshell.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/eshell.el')
-rw-r--r--lisp/eshell/eshell.el24
1 files changed, 10 insertions, 14 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index c7ed7103e40..db20f7d9ec5 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -175,10 +175,10 @@
(eval-when-compile
(require 'cl-lib))
(require 'esh-util)
-;; Provide eshell before requiring esh-mode, to avoid a recursive load.
-;; (Bug #34954)
-(provide 'eshell)
-(require 'esh-mode)
+(require 'esh-module) ;For eshell-using-module
+(require 'esh-proc) ;For eshell-wait-for-process
+(require 'esh-io) ;For eshell-last-command-status
+(require 'esh-cmd)
(defgroup eshell nil
"Command shell implemented entirely in Emacs Lisp.
@@ -220,12 +220,6 @@ shells such as bash, zsh, rc, 4dos."
:type 'string
:group 'eshell)
-(defcustom eshell-directory-name
- (locate-user-emacs-file "eshell/" ".eshell/")
- "The directory where Eshell control files should be kept."
- :type 'directory
- :group 'eshell)
-
;;;_* Running Eshell
;;
;; There are only three commands used to invoke Eshell. The first two
@@ -259,11 +253,12 @@ buffer selected (or created)."
buf))
(defun eshell-return-exits-minibuffer ()
+ ;; This is supposedly run after enabling esh-mode, when eshell-mode-map
+ ;; already exists.
+ (defvar eshell-mode-map)
(define-key eshell-mode-map [(control ?g)] 'abort-recursive-edit)
- (define-key eshell-mode-map [return] 'exit-minibuffer)
(define-key eshell-mode-map [(control ?m)] 'exit-minibuffer)
(define-key eshell-mode-map [(control ?j)] 'exit-minibuffer)
- (define-key eshell-mode-map [(meta return)] 'exit-minibuffer)
(define-key eshell-mode-map [(meta control ?m)] 'exit-minibuffer))
(defvar eshell-non-interactive-p nil
@@ -278,7 +273,6 @@ non-interactive sessions, such as when using `eshell-command'.")
"Execute the Eshell command string COMMAND.
With prefix ARG, insert output into the current buffer at point."
(interactive)
- (require 'esh-cmd)
(unless arg
(setq arg current-prefix-arg))
(let ((eshell-non-interactive-p t))
@@ -366,7 +360,8 @@ corresponding to a successful execution."
(let ((result (eshell-do-eval
(list 'eshell-commands
(list 'eshell-command-to-value
- (eshell-parse-command command))) t)))
+ (eshell-parse-command command)))
+ t)))
(cl-assert (eq (car result) 'quote))
(if (and status-var (symbolp status-var))
(set status-var eshell-last-command-status))
@@ -406,4 +401,5 @@ Emacs."
(run-hooks 'eshell-load-hook)
+(provide 'eshell)
;;; eshell.el ends here