helm: extract helm-descbinds defuns

This commit is contained in:
Henrik Lissner 2016-03-23 11:52:55 -04:00
parent f0ce0c4718
commit 658e7731b7
3 changed files with 24 additions and 20 deletions

2
Cask
View file

@ -104,7 +104,7 @@
(depends-on "helm-css-scss")
(depends-on "helm-projectile")
(depends-on "helm-swoop")
; (depends-on "helm-descbinds")
(depends-on "helm-descbinds")
(depends-on "projectile")
(depends-on "helm-describe-modes" :git "https://github.com/emacs-helm/helm-describe-modes")

View file

@ -146,26 +146,11 @@
helm-swoop-pre-input-function (lambda () "")))
(use-package helm-describe-modes :defer t)
(use-package helm-semantic :commands helm-semantic-or-imenu)
(use-package helm-elisp :commands helm-apropos)
(use-package helm-command :commands helm-M-x)
(use-package helm-semantic :commands helm-semantic-or-imenu)
(use-package helm-elisp :commands helm-apropos)
(use-package helm-command :commands helm-M-x)
(use-package helm-descbinds :commands helm-descbinds
:config
(setq helm-descbinds-window-style 'split-window)
(defun narf/helm-descbinds-leader ()
(interactive)
(narf-helm-descbinds "^,\\ "))
(defun narf/helm-descbinds-localleader ()
(interactive)
(narf-helm-descbinds "^\\\\\\ "))
(defun narf-helm-descbinds (&optional input buffer)
(let ((enable-recursive-minibuffers t))
(helm :sources (helm-descbinds-sources (or buffer (current-buffer)))
:buffer "*helm-descbinds*"
:resume 'noresume
:allow-nest t
:input input))))
:config (setq helm-descbinds-window-style 'split-window))
(provide 'core-helm)
;;; core-helm.el ends here

View file

@ -73,5 +73,24 @@ buffers."
(let ((narf-helm-force-project-buffers (and (not all-p) (narf/project-p))))
(helm-buffers-list)))
;;;###autoload
(defun narf/helm-descbinds-leader ()
(interactive)
(narf--helm-descbinds "^,\\ "))
;;;###autoload
(defun narf/helm-descbinds-localleader ()
(interactive)
(narf--helm-descbinds "^\\\\\\ "))
(defun narf--helm-descbinds (&optional input buffer)
(let ((enable-recursive-minibuffers t))
(require 'helm-descbinds)
(helm :sources (helm-descbinds-sources (or buffer (current-buffer)))
:buffer "*helm-descbinds*"
:resume 'noresume
:allow-nest t
:input input)))
(provide 'defuns-helm)
;;; defuns-helm.el ends here