summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-hist.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/em-hist.el')
-rw-r--r--lisp/eshell/em-hist.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 05579eed32a..bc0da96c588 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -59,6 +59,7 @@
(require 'ring)
(require 'esh-opt)
+(require 'esh-mode)
(require 'em-pred)
(require 'eshell)
@@ -192,7 +193,6 @@ element, regardless of any text on the command line. In that case,
(defvar eshell-isearch-map
(let ((map (copy-keymap isearch-mode-map)))
(define-key map [(control ?m)] 'eshell-isearch-return)
- (define-key map [return] 'eshell-isearch-return)
(define-key map [(control ?r)] 'eshell-isearch-repeat-backward)
(define-key map [(control ?s)] 'eshell-isearch-repeat-forward)
(define-key map [(control ?g)] 'eshell-isearch-abort)
@@ -220,7 +220,7 @@ Returns nil if INPUT is prepended by blank space, otherwise non-nil."
"Initialize the history management code for one Eshell buffer."
(when (eshell-using-module 'eshell-cmpl)
(add-hook 'pcomplete-try-first-hook
- 'eshell-complete-history-reference nil t))
+ #'eshell-complete-history-reference nil t))
(if (and (eshell-using-module 'eshell-rebind)
(not eshell-non-interactive-p))
@@ -235,11 +235,13 @@ Returns nil if INPUT is prepended by blank space, otherwise non-nil."
(lambda ()
(if (>= (point) eshell-last-output-end)
(setq overriding-terminal-local-map
- eshell-isearch-map)))) nil t)
+ eshell-isearch-map))))
+ nil t)
(add-hook 'isearch-mode-end-hook
(function
(lambda ()
- (setq overriding-terminal-local-map nil))) nil t))
+ (setq overriding-terminal-local-map nil)))
+ nil t))
(define-key eshell-mode-map [up] 'eshell-previous-matching-input-from-input)
(define-key eshell-mode-map [down] 'eshell-next-matching-input-from-input)
(define-key eshell-mode-map [(control up)] 'eshell-previous-input)
@@ -288,17 +290,17 @@ Returns nil if INPUT is prepended by blank space, otherwise non-nil."
(if eshell-history-file-name
(eshell-read-history nil t))
- (add-hook 'eshell-exit-hook 'eshell-write-history nil t))
+ (add-hook 'eshell-exit-hook #'eshell-write-history nil t))
(unless eshell-history-ring
(setq eshell-history-ring (make-ring eshell-history-size)))
- (add-hook 'eshell-exit-hook 'eshell-write-history nil t)
+ (add-hook 'eshell-exit-hook #'eshell-write-history nil t)
- (add-hook 'kill-emacs-hook 'eshell-save-some-history)
+ (add-hook 'kill-emacs-hook #'eshell-save-some-history)
(make-local-variable 'eshell-input-filter-functions)
- (add-hook 'eshell-input-filter-functions 'eshell-add-to-history nil t)
+ (add-hook 'eshell-input-filter-functions #'eshell-add-to-history nil t)
(define-key eshell-command-map [(control ?l)] 'eshell-list-history)
(define-key eshell-command-map [(control ?x)] 'eshell-get-next-from-history))
@@ -754,7 +756,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)