]> code.delx.au - gnu-emacs-elpa/commitdiff
counsel.el (counsel-expression-history): New command
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 7 Apr 2016 14:40:26 +0000 (16:40 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 7 Apr 2016 14:40:26 +0000 (16:40 +0200)
* README.md: Update.

README.md
counsel.el

index 572459dcab6bf8babc427d9b4d6456bf88976385..3348189f26a6b90456dba863578df654cb60d607 100644 (file)
--- 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
index 9c4dbf868a0cf50453f1ee3bf8c5049185682106..e0b421d5afe1462f570a4117b6d3fdc253f3c564 100644 (file)
@@ -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'