diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-03-31 21:12:47 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-03-31 21:12:47 +0200 |
commit | 22eff19871c6d0de56c2dad2db29c4394714c61f (patch) | |
tree | 1eb223506613051557326c80013ab5c9b30d2090 /helm-bookmark.el | |
parent | ee9b12d60c67c8d15ff0060bf6429e3124841dc9 (diff) |
Add new source to set addressbook bookmark.
* helm-bookmark.el (addressbook-bookmark-set-1): Declare.
(helm-source-addressbook-set): New dummy source.
(helm-addressbook-bookmarks): Use it.
Diffstat (limited to 'helm-bookmark.el')
-rw-r--r-- | helm-bookmark.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/helm-bookmark.el b/helm-bookmark.el index 950e8094..da1dfcf1 100644 --- a/helm-bookmark.el +++ b/helm-bookmark.el @@ -31,6 +31,7 @@ (declare-function message-buffers "message.el") (declare-function addressbook-set-mail-buffer-1 "ext:addressbook-bookmark.el" (&optional bookmark-name append cc)) +(declare-function addressbook-bookmark-set-1 "ext:addressbook-bookmark.el" (&optional contact)) (declare-function helm-browse-project "helm-files" (arg)) @@ -591,6 +592,11 @@ than `w3m-browse-url' use it." (defvar helm-source-bookmark-addressbook (helm-make-source "Bookmark Addressbook" 'helm-bookmark-addressbook-class)) +(defvar helm-source-addressbook-set + (helm-build-dummy-source "Addressbook add contact" + :action (lambda (candidate) + (addressbook-bookmark-set-1 candidate)))) + ;;; Transformer ;; @@ -804,7 +810,8 @@ only if external addressbook-bookmark package is installed." "Preconfigured helm for addressbook bookmarks. Need addressbook-bookmark package as dependencie." (interactive) - (helm :sources 'helm-source-bookmark-addressbook + (helm :sources '(helm-source-bookmark-addressbook + helm-source-addressbook-set) :prompt "Search Contact: " :buffer "*helm addressbook*" :default (list (thing-at-point 'symbol) |