aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell/eshell.el
diff options
context:
space:
mode:
authorStephen Leake2019-04-11 14:00:02 -0700
committerStephen Leake2019-04-11 14:00:02 -0700
commit7ba7def5caf7ec9d9bebffff489f0a658229fbda (patch)
treee0cfcb59937ca0528fb81769d7d48a904a91f5dc /lisp/eshell/eshell.el
parent7768581172e11be52b1fcd8224f4594e126bbdb7 (diff)
parentde238b39e335c6814283faa171b35145f124edf2 (diff)
downloademacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.tar.gz
emacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.zip
Merge commit 'de238b39e335c6814283faa171b35145f124edf2'
Diffstat (limited to 'lisp/eshell/eshell.el')
-rw-r--r--lisp/eshell/eshell.el21
1 files changed, 9 insertions, 12 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index 45168007565..db20f7d9ec5 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -175,7 +175,10 @@
175(eval-when-compile 175(eval-when-compile
176 (require 'cl-lib)) 176 (require 'cl-lib))
177(require 'esh-util) 177(require 'esh-util)
178(require 'esh-mode) 178(require 'esh-module) ;For eshell-using-module
179(require 'esh-proc) ;For eshell-wait-for-process
180(require 'esh-io) ;For eshell-last-command-status
181(require 'esh-cmd)
179 182
180(defgroup eshell nil 183(defgroup eshell nil
181 "Command shell implemented entirely in Emacs Lisp. 184 "Command shell implemented entirely in Emacs Lisp.
@@ -217,12 +220,6 @@ shells such as bash, zsh, rc, 4dos."
217 :type 'string 220 :type 'string
218 :group 'eshell) 221 :group 'eshell)
219 222
220(defcustom eshell-directory-name
221 (locate-user-emacs-file "eshell/" ".eshell/")
222 "The directory where Eshell control files should be kept."
223 :type 'directory
224 :group 'eshell)
225
226;;;_* Running Eshell 223;;;_* Running Eshell
227;; 224;;
228;; There are only three commands used to invoke Eshell. The first two 225;; There are only three commands used to invoke Eshell. The first two
@@ -256,11 +253,12 @@ buffer selected (or created)."
256 buf)) 253 buf))
257 254
258(defun eshell-return-exits-minibuffer () 255(defun eshell-return-exits-minibuffer ()
256 ;; This is supposedly run after enabling esh-mode, when eshell-mode-map
257 ;; already exists.
258 (defvar eshell-mode-map)
259 (define-key eshell-mode-map [(control ?g)] 'abort-recursive-edit) 259 (define-key eshell-mode-map [(control ?g)] 'abort-recursive-edit)
260 (define-key eshell-mode-map [return] 'exit-minibuffer)
261 (define-key eshell-mode-map [(control ?m)] 'exit-minibuffer) 260 (define-key eshell-mode-map [(control ?m)] 'exit-minibuffer)
262 (define-key eshell-mode-map [(control ?j)] 'exit-minibuffer) 261 (define-key eshell-mode-map [(control ?j)] 'exit-minibuffer)
263 (define-key eshell-mode-map [(meta return)] 'exit-minibuffer)
264 (define-key eshell-mode-map [(meta control ?m)] 'exit-minibuffer)) 262 (define-key eshell-mode-map [(meta control ?m)] 'exit-minibuffer))
265 263
266(defvar eshell-non-interactive-p nil 264(defvar eshell-non-interactive-p nil
@@ -275,7 +273,6 @@ non-interactive sessions, such as when using `eshell-command'.")
275 "Execute the Eshell command string COMMAND. 273 "Execute the Eshell command string COMMAND.
276With prefix ARG, insert output into the current buffer at point." 274With prefix ARG, insert output into the current buffer at point."
277 (interactive) 275 (interactive)
278 (require 'esh-cmd)
279 (unless arg 276 (unless arg
280 (setq arg current-prefix-arg)) 277 (setq arg current-prefix-arg))
281 (let ((eshell-non-interactive-p t)) 278 (let ((eshell-non-interactive-p t))
@@ -363,7 +360,8 @@ corresponding to a successful execution."
363 (let ((result (eshell-do-eval 360 (let ((result (eshell-do-eval
364 (list 'eshell-commands 361 (list 'eshell-commands
365 (list 'eshell-command-to-value 362 (list 'eshell-command-to-value
366 (eshell-parse-command command))) t))) 363 (eshell-parse-command command)))
364 t)))
367 (cl-assert (eq (car result) 'quote)) 365 (cl-assert (eq (car result) 'quote))
368 (if (and status-var (symbolp status-var)) 366 (if (and status-var (symbolp status-var))
369 (set status-var eshell-last-command-status)) 367 (set status-var eshell-last-command-status))
@@ -404,5 +402,4 @@ Emacs."
404(run-hooks 'eshell-load-hook) 402(run-hooks 'eshell-load-hook)
405 403
406(provide 'eshell) 404(provide 'eshell)
407
408;;; eshell.el ends here 405;;; eshell.el ends here