From eaa3274568dab0a6659d866a7e088cfc96e6aa8d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 12 Jan 2014 21:55:52 +0900 Subject: [PATCH] fix eshell advice --- emacs.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs.el b/emacs.el index 4c1e1ce..1d5f9a7 100644 --- a/emacs.el +++ b/emacs.el @@ -1770,10 +1770,12 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." ;; do not cycle history (around eshell-history-do-not-cycle activate) (if (= 0 - eshell-history-index) + (or eshell-history-index + 0)) (progn (delete-region eshell-last-output-end (point)) - (insert-and-inherit eshell-matching-input-from-input-string)) + (insert-and-inherit eshell-matching-input-from-input-string) + (setq eshell-history-index nil)) ad-do-it)) (setq eshell-directory-name "~/.emacs.d/eshell/")