]> git.eshelyaron.com Git - emacs.git/commitdiff
; Remove unused Eshell target type
authorJim Porter <jporterbugs@gmail.com>
Sat, 11 Mar 2023 23:37:38 +0000 (15:37 -0800)
committerJim Porter <jporterbugs@gmail.com>
Mon, 21 Aug 2023 18:43:24 +0000 (11:43 -0700)
Eshell creates all output targets in 'eshell-get-target', and that
function never returns a cons cell.

* lisp/eshell/esh-io.el (eshell-close-target)
(eshell-output-object-to-target): Remove 'consp' condition.

lisp/eshell/esh-io.el

index cccdb49ce2ac583d686e5c5f857645d1df09f81c..1ec4f91828250caab3299c6dbb7c6edde5d810c8 100644 (file)
@@ -466,13 +466,7 @@ STATUS should be non-nil on successful termination of the output."
    ;; A plain function redirection needs no additional arguments
    ;; passed.
    ((functionp target)
-    (funcall target status))
-
-   ;; But a more complicated function redirection (which can only
-   ;; happen with aliases at the moment) has arguments that need to be
-   ;; passed along with it.
-   ((consp target)
-    (apply (car target) status (cdr target)))))
+    (funcall target status))))
 
 (defun eshell-kill-append (string)
   "Call `kill-append' with STRING, if it is indeed a string."
@@ -642,10 +636,7 @@ Returns what was actually sent, or nil if nothing was sent."
        (if (memq (process-status target)
                 '(run stop open closed))
            (signal (car err) (cdr err))
-         (signal 'eshell-pipe-broken (list target))))))
-
-   ((consp target)
-    (apply (car target) object (cdr target))))
+         (signal 'eshell-pipe-broken (list target)))))))
   object)
 
 (defun eshell-output-object (object &optional handle-index handles)