]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add debug instrumentation for Eshell argument modifiers
authorJim Porter <jporterbugs@gmail.com>
Sat, 2 Sep 2023 23:07:59 +0000 (16:07 -0700)
committerJim Porter <jporterbugs@gmail.com>
Sat, 2 Sep 2023 23:09:58 +0000 (16:09 -0700)
* lisp/eshell/esh-arg.el (eshell-resolve-current-argument): Add debug
instrumentation, and simplify modifier application.

lisp/eshell/esh-arg.el

index 26be1127880232f36aecc2e1d03187974d0bada7..e9c6a7f2f684b398746a0c159f1e4a0e821d0a80 100644 (file)
@@ -293,10 +293,13 @@ then the result will be:
               (append (list 'eshell-concat eshell-current-quoted)
                       eshell-current-argument)))
       (setq eshell-arg-listified nil))
-    (while eshell-current-modifiers
+    (when eshell-current-modifiers
+      (eshell-debug-command 'form (format-message "applying modifiers %S"
+                                                  eshell-current-modifiers)
+                            eshell-current-argument))
+    (dolist (modifier eshell-current-modifiers)
       (setq eshell-current-argument
-           (list (car eshell-current-modifiers) eshell-current-argument)
-           eshell-current-modifiers (cdr eshell-current-modifiers))))
+            (list modifier eshell-current-argument))))
   (setq eshell-current-modifiers nil))
 
 (defun eshell-finish-arg (&rest arguments)