X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/490a9458c8310140a255b30330e9940fb68e27ef..0e963201d03d9229bb8ac4323291d2b0119526ed:/lisp/eshell/esh-proc.el diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index aa630dc87a..8c6bad089c 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -1,6 +1,6 @@ -;;; esh-proc.el --- process management +;;; esh-proc.el --- process management -*- lexical-binding:t -*- -;; Copyright (C) 1999-2013 Free Software Foundation, Inc. +;; Copyright (C) 1999-2016 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -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 @@ -118,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 () @@ -135,7 +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)) -(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'." @@ -409,7 +409,8 @@ If QUERY is non-nil, query the user with QUERY before calling FUNC." (or all (not (nth 2 entry))) (or (not query) - (y-or-n-p (format query (process-name (car entry)))))) + (y-or-n-p (format-message query + (process-name (car entry)))))) (setq result (funcall func (car entry)))) (unless (memq (process-status (car entry)) '(run stop open closed)) @@ -480,11 +481,11 @@ See the variable `eshell-kill-processes-on-exit'." (save-window-excursion (list-processes) (if (or (not (eq eshell-kill-processes-on-exit 'ask)) - (y-or-n-p (format "Kill processes owned by `%s'? " - (buffer-name)))) + (y-or-n-p (format-message "Kill processes owned by `%s'? " + (buffer-name)))) (eshell-round-robin-kill (if (eq eshell-kill-processes-on-exit 'every) - "Kill Eshell child process `%s'? "))) + (format-message "Kill Eshell child process `%s'? ")))) (let ((buf (get-buffer "*Process List*"))) (if (and buf (buffer-live-p buf)) (kill-buffer buf)))