From: Oleh Krehel Date: Wed, 13 Apr 2016 16:01:49 +0000 (+0200) Subject: Clean-up previous change X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/41e2e413673158863b6a6b2e7627acb3f69bd56c Clean-up previous change * counsel.el (counsel--browse-history): Rename from `browse-history'. (eshell-history-ring): (comint-input-ring): Declare. (counsel-esh-history): Add require. (counsel-shell-history): Add require. (** `counsel-esh-history'): Add an outline. Fixes #459 --- diff --git a/counsel.el b/counsel.el index 76daf6d94..864340a2a 100644 --- a/counsel.el +++ b/counsel.el @@ -1896,7 +1896,8 @@ And insert it into the minibuffer. Useful during (ivy-read "Expr: " (delete-dups read-expression-history) :action #'insert))) -(defun browse-history (elements) +;;** `counsel-esh-history' +(defun counsel--browse-history (elements) "Use Ivy to navigate through ELEMENTS." (setq ivy-completion-beg (point)) (setq ivy-completion-end (point)) @@ -1905,17 +1906,23 @@ And insert it into the minibuffer. Useful during (ring-elements elements)) :action #'ivy-completion-in-region-action)) +(defvar eshell-history-ring) + ;;;###autoload (defun counsel-esh-history () "Browse Eshell history." (interactive) - (browse-history eshell-history-ring)) + (require 'em-hist) + (counsel--browse-history eshell-history-ring)) + +(defvar comint-input-ring) ;;;###autoload (defun counsel-shell-history () "Browse shell history." (interactive) - (browse-history comint-input-ring)) + (require 'comint) + (counsel--browse-history comint-input-ring)) ;;* Misc OS ;;** `counsel-rhythmbox'