emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ea685170063: Fix definitions of Eshell "xtra" functions


From: Jim Porter
Subject: master ea685170063: Fix definitions of Eshell "xtra" functions
Date: Mon, 28 Oct 2024 00:16:08 -0400 (EDT)

branch: master
commit ea685170063b59855322ceffdeaaab4acaf8e388
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    Fix definitions of Eshell "xtra" functions
    
    * lisp/eshell/em-xtra.el (eshell-parse-command): Remove unnecessary
    autoload.
    (eshell/substitute): Pass the correct number of arguments to
    'cl-substitute'.
    (eshell/count, eshell/union, eshell/mismatch, eshell/intersection)
    (eshell/set-difference, eshell/set-exclusive-or): Use named arguments
    for the required arguments (bug#73738).
---
 lisp/eshell/em-xtra.el | 37 ++++++++++++++-----------------------
 1 file changed, 14 insertions(+), 23 deletions(-)

diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el
index 0a032395fd3..263ec37a720 100644
--- a/lisp/eshell/em-xtra.el
+++ b/lisp/eshell/em-xtra.el
@@ -40,46 +40,37 @@ naturally accessible within Emacs."
 
 ;;; Functions:
 
-(autoload 'eshell-parse-command "esh-cmd")
-
 (defun eshell/expr (&rest args)
   "Implementation of expr, using the calc package."
   (calc-eval (eshell-flatten-and-stringify args)))
 
-(defun eshell/substitute (&rest args)
+(defun eshell/substitute (new old seq &rest args)
   "Easy front-end to `cl-substitute', for comparing lists of strings."
-  (apply #'cl-substitute (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-substitute new old seq :test #'equal args))
 
-(defun eshell/count (&rest args)
+(defun eshell/count (item seq &rest args)
   "Easy front-end to `cl-count', for comparing lists of strings."
-  (apply #'cl-count (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-count item seq :test #'equal args))
 
-(defun eshell/mismatch (&rest args)
+(defun eshell/mismatch (seq1 seq2 &rest args)
   "Easy front-end to `cl-mismatch', for comparing lists of strings."
-  (apply #'cl-mismatch (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-mismatch seq1 seq2 :test #'equal args))
 
-(defun eshell/union (&rest args)
+(defun eshell/union (list1 list2 &rest args)
   "Easy front-end to `cl-union', for comparing lists of strings."
-  (apply #'cl-union (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-union list1 list2 :test #'equal args))
 
-(defun eshell/intersection (&rest args)
+(defun eshell/intersection (list1 list2 &rest args)
   "Easy front-end to `cl-intersection', for comparing lists of strings."
-  (apply #'cl-intersection (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-intersection list1 list2 :test #'equal args))
 
-(defun eshell/set-difference (&rest args)
+(defun eshell/set-difference (list1 list2 &rest args)
   "Easy front-end to `cl-set-difference', for comparing lists of strings."
-  (apply #'cl-set-difference (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-set-difference list1 list2 :test #'equal args))
 
-(defun eshell/set-exclusive-or (&rest args)
+(defun eshell/set-exclusive-or (list1 list2 &rest args)
   "Easy front-end to `cl-set-exclusive-or', for comparing lists of strings."
-  (apply #'cl-set-exclusive-or (car args) (cadr args) :test #'equal
-        (cddr args)))
+  (apply #'cl-set-exclusive-or list1 list2 :test #'equal args))
 
 (defalias 'eshell/ff #'find-name-dired)
 (defalias 'eshell/gf #'find-grep-dired)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]