]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-hist.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / eshell / em-hist.el
index ec3cc8e1626c12866ab743849a4ea3d9dd6ddfe9..1cdf6d69714d6e6b429a4e4ae7f7d355f40d01ed 100644 (file)
@@ -1,6 +1,6 @@
 ;;; em-hist.el --- history list management  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -509,7 +509,8 @@ See also `eshell-read-history'."
        ;; Change "completion" to "history reference"
        ;; to make the display accurate.
        (with-output-to-temp-buffer history-buffer
-         (display-completion-list history prefix)
+         (display-completion-list
+          (completion-hilit-commonality history (length prefix)))
          (set-buffer history-buffer)
          (forward-line 3)
          (while (search-backward "completion" nil 'move)
@@ -723,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)
@@ -736,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)))))