summaryrefslogtreecommitdiff
path: root/helm-buffers.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2015-06-13 16:49:54 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2015-06-13 16:51:26 +0200
commit33fefdcc1dfd0bd3dd3061654554f6a890a13b9e (patch)
tree1d3249e5beec6b3d45c26f50d14372b81565bd86 /helm-buffers.el
parentce9d50f9a766bb4e8048cb207fe918788898261f (diff)
Move helm-mini to helm-buffers.el (#1057).
* helm-buffers.el: Do it. * helm-misc.el: Do it.
Diffstat (limited to 'helm-buffers.el')
-rw-r--r--helm-buffers.el22
1 files changed, 21 insertions, 1 deletions
diff --git a/helm-buffers.el b/helm-buffers.el
index 605f6a7f..9a5bdfd8 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -80,7 +80,14 @@ Only buffer names are fuzzy matched when this is enabled,
"Truncate lines in `helm-buffers-list' when non--nil."
:group 'helm-buffers
:type 'boolean)
-
+
+(defcustom helm-mini-default-sources '(helm-source-buffers-list
+ helm-source-recentf
+ helm-source-buffer-not-found)
+ "Default sources list used in `helm-mini'."
+ :group 'helm-misc
+ :type '(repeat (choice symbol)))
+
;;; Faces
;;
@@ -848,6 +855,19 @@ displayed with the `file-name-shadow' face if available."
:keymap helm-buffer-map
:truncate-lines helm-buffers-truncate-lines))
+;;;###autoload
+(defun helm-mini ()
+ "Preconfigured `helm' lightweight version \(buffer -> recentf\)."
+ (interactive)
+ (require 'helm-files)
+ (unless helm-source-buffers-list
+ (setq helm-source-buffers-list
+ (helm-make-source "Buffers" 'helm-source-buffers)))
+ (helm :sources helm-mini-default-sources
+ :buffer "*helm mini*"
+ :ff-transformer-show-only-basename nil
+ :truncate-lines helm-buffers-truncate-lines))
+
(provide 'helm-buffers)
;; Local Variables: