Skip to content

Commit

Permalink
improve lacarte.el related stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-heerdegen committed Dec 9, 2013
1 parent 2abe760 commit dc2eb59
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions helm-misc.el
Expand Up @@ -179,17 +179,30 @@ http://www.emacswiki.org/cgi-bin/wiki/download/linkd.el")

;;; LaCarte
;;
(defvar helm-source-lacarte
'((name . "Lacarte")

(defun helm-create-lacarte-source (name &optional maps)
"Create lacarte source named NAME for MAPS.
MAPS is like in `lacarte-get-overall-menu-item-alist'.
See
http://www.emacswiki.org/cgi-bin/wiki/download/lacarte.el"
`((name . ,name)
(init . (lambda () (require 'lacarte)))
(candidates . (lambda ()
(with-helm-current-buffer
(delete '(nil) (lacarte-get-overall-menu-item-alist)))))
(delete '(nil) (lacarte-get-overall-menu-item-alist ,@maps)))))
(candidate-number-limit . 9999)
(action . helm-call-interactively))
"Needs lacarte.el.
(type . command)))

(defvar helm-source-lacarte (helm-create-lacarte-source "Lacarte")
"Helm interface for lacarte.el.
See
http://www.emacswiki.org/cgi-bin/wiki/download/lacarte.el")

http://www.emacswiki.org/cgi-bin/wiki/download/lacarte.el")
(defun helm-browse-menubar ()
"Helm interface to the menubar using lacarte.el."
(interactive)
(require 'lacarte)
(helm :sources 'helm-source-lacarte))

(defun helm-call-interactively (cmd-or-name)
"Execute CMD-OR-NAME as Emacs command.
Expand Down

0 comments on commit dc2eb59

Please sign in to comment.