From 450bebaec94611f0958e13e35faf494e17931f8e Mon Sep 17 00:00:00 2001 From: Samer Masterson Date: Tue, 24 Feb 2015 14:03:54 -0500 Subject: [PATCH] * 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. --- lisp/ChangeLog | 16 ++++++++++++---- lisp/eshell/em-hist.el | 4 ++-- lisp/eshell/em-pred.el | 14 +++++++------- lisp/hi-lock.el | 2 +- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c50f25e376..b152a752115 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2015-02-24 Samer Masterson + + * eshell/em-hist.el (eshell-hist-parse-word-designator): + Return args joined with " ". + * eshell/em-pred.el (eshell-parse-modifiers): Correct docstring. + (eshell-hist-parse-modifier): Pass mod a list instead of a string + (bug#18960). + 2015-02-24 Karl Fogel (tiny change) * comint.el (comint-mode-map): Fix obvious typo. @@ -100,8 +108,8 @@ (verilog-auto-inst, verilog-auto-inst-param): Use arguments rather than vector-skip. (verilog-auto-inst-port): Fix AUTOINST interfaces to not show - modport if signal attachment is itself a modport. Reported by - Matthew Lovell. + modport if signal attachment is itself a modport. + Reported by Matthew Lovell. 2015-02-21 Reto Zimmermann @@ -341,7 +349,7 @@ 2015-02-11 Stefan Monnier * hi-lock.el (hi-lock-unface-buffer): Don't call - font-lock-remove-keywords if not needed (bug#19737). + font-lock-remove-keywords if not needed (bug#19796). 2015-02-11 Artur Malabarba @@ -1622,7 +1630,7 @@ * vc/vc-svn.el (vc-svn-dir-status-files): Pass t as vc-svn-after-dir-status's second argument. (Bug#19429) -2015-01-16 Samer Masterson (tiny change) +2015-01-16 Samer Masterson * pcomplete.el (pcomplete-parse-arguments): Parse arguments regardless of pcomplete-cycle-completions's value. (Bug#18950) 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)) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index d74664a845f..0255585f532 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -600,7 +600,7 @@ then remove all hi-lock highlighting." ;; `font-lock-specified-p' to go from nil to non-nil (because it ;; calls font-lock-set-defaults). This is yet-another bug in ;; font-lock-add/remove-keywords, which we circumvent here by - ;; testing `font-lock-fontified' (bug#19737). + ;; testing `font-lock-fontified' (bug#19796). (if font-lock-fontified (font-lock-remove-keywords nil (list keyword))) (setq hi-lock-interactive-patterns (delq keyword hi-lock-interactive-patterns)) -- 2.39.2