summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-09-18 20:44:55 -0700
committerGlenn Morris <rgm@gnu.org>2013-09-18 20:44:55 -0700
commit336b5a56bc0e840cd2a59f976b2f801d5a4a260c (patch)
tree917cf855f11791cb0f8248ca6b3a75aabea78c39 /lisp/eshell
parent390b7f9de6215917c6cf08e30ca898562d2517e3 (diff)
downloademacs-336b5a56bc0e840cd2a59f976b2f801d5a4a260c.tar.gz
emacs-336b5a56bc0e840cd2a59f976b2f801d5a4a260c.tar.bz2
emacs-336b5a56bc0e840cd2a59f976b2f801d5a4a260c.zip
Revise previous esh-proc change
* eshell/esh-proc.el (eshell-kill-process-function): Remove eshell-reset-after-proc from eshell-kill-hook if present. (eshell-reset-after-proc): Remove unused arg `proc'.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-proc.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index b72e6328d64..ab7fd349893 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -116,9 +116,11 @@ information, for example."
(defun eshell-kill-process-function (proc status)
"Function run when killing a process.
Runs `eshell-reset-after-proc' and `eshell-kill-hook', passing arguments
-PROC and STATUS to both."
- (or (memq 'eshell-reset-after-proc eshell-kill-hook)
- (eshell-reset-after-proc proc status))
+PROC and STATUS to functions on the latter."
+ ;; Was there till 24.1, but it is not optional.
+ (if (memq 'eshell-reset-after-proc eshell-kill-hook)
+ (setq eshell-kill-hook (delq 'eshell-reset-after-proc eshell-kill-hook)))
+ (eshell-reset-after-proc status)
(run-hook-with-args 'eshell-kill-hook proc status))
(defun eshell-proc-initialize ()
@@ -133,11 +135,7 @@ PROC and STATUS to both."
; (define-key eshell-command-map [(control ?z)] 'eshell-stop-process)
(define-key eshell-command-map [(control ?\\)] 'eshell-quit-process))
-;; This used to be on `eshell-kill-hook', which calls its functions
-;; with two arguments. Nowadays we call it directly in
-;; `eshell-kill-process-function', but in case anyone still has it
-;; on `eshell-kill-hook', _proc has to stay.
-(defun eshell-reset-after-proc (_proc status)
+(defun eshell-reset-after-proc (status)
"Reset the command input location after a process terminates.
The signals which will cause this to happen are matched by
`eshell-reset-signals'."