summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorSamer Masterson <nosefrog@gmail.com>2015-02-24 14:03:54 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2015-02-24 14:03:54 -0500
commit450bebaec94611f0958e13e35faf494e17931f8e (patch)
tree2b68e77e3dda7a9981f14eb872287d46d587619b /lisp/eshell
parentfeb49cb7a481f988350899c748ba5582ffac5bf7 (diff)
downloademacs-450bebaec94611f0958e13e35faf494e17931f8e.tar.gz
emacs-450bebaec94611f0958e13e35faf494e17931f8e.tar.bz2
emacs-450bebaec94611f0958e13e35faf494e17931f8e.zip
* lisp/eshell: Fix history substitution error
Fixes: debbugs:18960 * lisp/eshell/em-hist.el (eshell-hist-parse-word-designator): Return args joined with " ". * lisp/eshell/em-pred.el (eshell-parse-modifiers): Correct docstring. (eshell-hist-parse-modifier): Pass mod a list instead of a string.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-hist.el4
-rw-r--r--lisp/eshell/em-pred.el14
2 files changed, 9 insertions, 9 deletions
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 55c83e45226..1cdf6d69714 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)))))
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el
index abaa99eff23..289d37dd580 100644
--- a/lisp/eshell/em-pred.el
+++ b/lisp/eshell/em-pred.el
@@ -119,7 +119,8 @@ The format of each entry is
(function
(lambda (str)
(eshell-stringify
- (car (eshell-parse-argument str))))) lst)))
+ (car (eshell-parse-argument str)))))
+ lst)))
(?L . #'(lambda (lst) (mapcar 'downcase lst)))
(?U . #'(lambda (lst) (mapcar 'upcase lst)))
(?C . #'(lambda (lst) (mapcar 'capitalize lst)))
@@ -296,16 +297,15 @@ This function is specially for adding onto `eshell-parse-argument-hook'."
(defun eshell-parse-modifiers ()
"Parse value modifiers and predicates at point.
-If ALLOW-PREDS is non-nil, predicates will be parsed as well.
Return a cons cell of the form
(PRED-FUNC-LIST . MOD-FUNC-LIST)
-NEW-STRING is STRING minus any modifiers. PRED-FUNC-LIST is a list of
-predicate functions. MOD-FUNC-LIST is a list of result modifier
-functions. PRED-FUNCS take a filename and return t if the test
-succeeds; MOD-FUNCS take any string and preform a modification,
-returning the resultant string."
+PRED-FUNC-LIST is a list of predicate functions. MOD-FUNC-LIST
+is a list of result modifier functions. PRED-FUNCS take a
+filename and return t if the test succeeds; MOD-FUNCS take any
+list of strings and perform a modification, returning the
+resultant list of strings."
(let (negate follow preds mods)
(condition-case nil
(while (not (eobp))