From: Oleh Krehel Date: Thu, 7 Apr 2016 14:40:26 +0000 (+0200) Subject: counsel.el (counsel-expression-history): New command X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/a9205fa41f8a77c70a2f829c95f95a49f8e817f1 counsel.el (counsel-expression-history): New command * README.md: Update. --- diff --git a/README.md b/README.md index 572459dca..3348189f2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Ivy and Swiper wiki is here: [the wiki](https://github.com/abo-abo/swiper/wiki). (global-set-key (kbd "C-c k") 'counsel-ag) (global-set-key (kbd "C-x l") 'counsel-locate) (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) +(define-key read-expression-map (kbd "C-r") 'counsel-expression-history) ``` ## Contributing diff --git a/counsel.el b/counsel.el index 9c4dbf868..e0b421d5a 100644 --- a/counsel.el +++ b/counsel.el @@ -1869,6 +1869,12 @@ An extra action allows to switch to the process buffer." :action action :require-match t :caller 'counsel-ace-link)))) +;;** `counsel-expression-history' +;;;###autoload +(defun counsel-expression-history () + (interactive) + (ivy-read "Expr: " (delete-dups read-expression-history) + :action #'insert)) ;;* Misc OS ;;** `counsel-rhythmbox'