Subject: bug#18960: 24.4; Eshell history substitution causes error

From: Samer Masterson <[email-masked]>
Date: Mon, 8 Dec 2014 03:54:46 -0800

The attached patch fixes this issue. This is my second emacs patch, so let
me know if I'm doing anything wrong or nonstandard.

Best,
Samer

Patch:
1 file changed, 2 insertions(+), 2 deletions(-)
 lisp/eshell/em-hist.el | 4 ++--

Modified   lisp/eshell/em-hist.el
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index b721b5d..e7e9a1e 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -724,7 +724,7 @@ matched."
  (setq nth (eshell-hist-word-reference nth)))
       (unless (numberp mth)
  (setq mth (eshell-hist-word-reference mth)))
-      (cons (mapconcat 'identity (eshell-sublist textargs nth mth) "")
+      (cons (mapconcat 'identity (eshell-sublist textargs nth mth) " ")
     end))))

 (defun eshell-hist-parse-modifier (hist reference)
@@ -737,7 +737,7 @@ matched."
   (goto-char (point-min))
   (let ((modifiers (cdr (eshell-parse-modifiers))))
     (dolist (mod modifiers)
-      (setq hist (funcall mod hist)))
+      (setq hist (car (funcall mod (list hist)))))
     hist))
       (delete-region here (point)))))