diff options
| author | Jim Porter | 2024-10-27 21:13:56 -0700 |
|---|---|---|
| committer | Jim Porter | 2024-10-27 21:13:56 -0700 |
| commit | ea685170063b59855322ceffdeaaab4acaf8e388 (patch) | |
| tree | 19c7fd690f65dfa59501f8afb59db2f88424dc6e /lisp/eshell | |
| parent | 29b30eb49f8bd8bad4f9e24dd56f32d62bf70121 (diff) | |
| download | emacs-ea685170063b59855322ceffdeaaab4acaf8e388.tar.gz emacs-ea685170063b59855322ceffdeaaab4acaf8e388.zip | |
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).
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/em-xtra.el | 37 |
1 files 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." | |||
| 40 | 40 | ||
| 41 | ;;; Functions: | 41 | ;;; Functions: |
| 42 | 42 | ||
| 43 | (autoload 'eshell-parse-command "esh-cmd") | ||
| 44 | |||
| 45 | (defun eshell/expr (&rest args) | 43 | (defun eshell/expr (&rest args) |
| 46 | "Implementation of expr, using the calc package." | 44 | "Implementation of expr, using the calc package." |
| 47 | (calc-eval (eshell-flatten-and-stringify args))) | 45 | (calc-eval (eshell-flatten-and-stringify args))) |
| 48 | 46 | ||
| 49 | (defun eshell/substitute (&rest args) | 47 | (defun eshell/substitute (new old seq &rest args) |
| 50 | "Easy front-end to `cl-substitute', for comparing lists of strings." | 48 | "Easy front-end to `cl-substitute', for comparing lists of strings." |
| 51 | (apply #'cl-substitute (car args) (cadr args) :test #'equal | 49 | (apply #'cl-substitute new old seq :test #'equal args)) |
| 52 | (cddr args))) | ||
| 53 | 50 | ||
| 54 | (defun eshell/count (&rest args) | 51 | (defun eshell/count (item seq &rest args) |
| 55 | "Easy front-end to `cl-count', for comparing lists of strings." | 52 | "Easy front-end to `cl-count', for comparing lists of strings." |
| 56 | (apply #'cl-count (car args) (cadr args) :test #'equal | 53 | (apply #'cl-count item seq :test #'equal args)) |
| 57 | (cddr args))) | ||
| 58 | 54 | ||
| 59 | (defun eshell/mismatch (&rest args) | 55 | (defun eshell/mismatch (seq1 seq2 &rest args) |
| 60 | "Easy front-end to `cl-mismatch', for comparing lists of strings." | 56 | "Easy front-end to `cl-mismatch', for comparing lists of strings." |
| 61 | (apply #'cl-mismatch (car args) (cadr args) :test #'equal | 57 | (apply #'cl-mismatch seq1 seq2 :test #'equal args)) |
| 62 | (cddr args))) | ||
| 63 | 58 | ||
| 64 | (defun eshell/union (&rest args) | 59 | (defun eshell/union (list1 list2 &rest args) |
| 65 | "Easy front-end to `cl-union', for comparing lists of strings." | 60 | "Easy front-end to `cl-union', for comparing lists of strings." |
| 66 | (apply #'cl-union (car args) (cadr args) :test #'equal | 61 | (apply #'cl-union list1 list2 :test #'equal args)) |
| 67 | (cddr args))) | ||
| 68 | 62 | ||
| 69 | (defun eshell/intersection (&rest args) | 63 | (defun eshell/intersection (list1 list2 &rest args) |
| 70 | "Easy front-end to `cl-intersection', for comparing lists of strings." | 64 | "Easy front-end to `cl-intersection', for comparing lists of strings." |
| 71 | (apply #'cl-intersection (car args) (cadr args) :test #'equal | 65 | (apply #'cl-intersection list1 list2 :test #'equal args)) |
| 72 | (cddr args))) | ||
| 73 | 66 | ||
| 74 | (defun eshell/set-difference (&rest args) | 67 | (defun eshell/set-difference (list1 list2 &rest args) |
| 75 | "Easy front-end to `cl-set-difference', for comparing lists of strings." | 68 | "Easy front-end to `cl-set-difference', for comparing lists of strings." |
| 76 | (apply #'cl-set-difference (car args) (cadr args) :test #'equal | 69 | (apply #'cl-set-difference list1 list2 :test #'equal args)) |
| 77 | (cddr args))) | ||
| 78 | 70 | ||
| 79 | (defun eshell/set-exclusive-or (&rest args) | 71 | (defun eshell/set-exclusive-or (list1 list2 &rest args) |
| 80 | "Easy front-end to `cl-set-exclusive-or', for comparing lists of strings." | 72 | "Easy front-end to `cl-set-exclusive-or', for comparing lists of strings." |
| 81 | (apply #'cl-set-exclusive-or (car args) (cadr args) :test #'equal | 73 | (apply #'cl-set-exclusive-or list1 list2 :test #'equal args)) |
| 82 | (cddr args))) | ||
| 83 | 74 | ||
| 84 | (defalias 'eshell/ff #'find-name-dired) | 75 | (defalias 'eshell/ff #'find-name-dired) |
| 85 | (defalias 'eshell/gf #'find-grep-dired) | 76 | (defalias 'eshell/gf #'find-grep-dired) |