diff options
| author | Jim Porter | 2024-10-20 15:02:18 -0700 |
|---|---|---|
| committer | Jim Porter | 2024-10-20 18:03:45 -0700 |
| commit | 183c5efc0fe80074a40ebebb684d787baf578ffe (patch) | |
| tree | 1ab41f5a7a9d206dee0823ccd7341060186a3ef2 /lisp/eshell | |
| parent | 75fa0cc1ae2b53fe169fdcfef52bee6719eb38a7 (diff) | |
| download | emacs-183c5efc0fe80074a40ebebb684d787baf578ffe.tar.gz emacs-183c5efc0fe80074a40ebebb684d787baf578ffe.zip | |
Be more careful about applying spliced arguments
Previously, this could 'nonc' to a list that shouldn't be modified.
* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Use 'append'
instead of 'nconc'.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-splice):
(esh-var-test/quoted-interp-var-splice): New tests.
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/esh-cmd.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index c9096b0d159..137abe6eb75 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -488,7 +488,7 @@ command hooks should be run before and after the command." | |||
| 488 | (grouped-terms (eshell-prepare-splice terms))) | 488 | (grouped-terms (eshell-prepare-splice terms))) |
| 489 | (cond | 489 | (cond |
| 490 | (grouped-terms | 490 | (grouped-terms |
| 491 | `(let ((new-terms (nconc ,@grouped-terms))) | 491 | `(let ((new-terms (append ,@grouped-terms))) |
| 492 | (,sym (car new-terms) (cdr new-terms)))) | 492 | (,sym (car new-terms) (cdr new-terms)))) |
| 493 | ;; If no terms are spliced, use a simpler command form. | 493 | ;; If no terms are spliced, use a simpler command form. |
| 494 | ((cdr terms) | 494 | ((cdr terms) |