diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-08-31 20:37:28 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-08-31 20:37:28 +0200 |
commit | cf761eea3c985138a7c48906db1de40902756b45 (patch) | |
tree | e091db48d05439c883b67af1e66a1bdc931e8b64 /helm-bookmark.el | |
parent | f60fc758fe8f8e432fe86b6131b42d6603fe74bf (diff) |
* helm-bookmark.el: Redefine helm-source-bookmarks.
Diffstat (limited to 'helm-bookmark.el')
-rw-r--r-- | helm-bookmark.el | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/helm-bookmark.el b/helm-bookmark.el index 06d678e5..42453554 100644 --- a/helm-bookmark.el +++ b/helm-bookmark.el @@ -83,21 +83,13 @@ map) "Generic Keymap for emacs bookmark sources.") -(defvar helm-bookmarks-cache nil) (defvar helm-source-bookmarks - '((name . "Bookmarks") - (init . (lambda () - (require 'bookmark) - (setq helm-bookmark-mode-line-string - (list (car helm-bookmark-mode-line-string) - (replace-regexp-in-string "Sort:\\[.*\\] " "" - (cadr helm-bookmark-mode-line-string)))) - (setq helm-bookmarks-cache - (bookmark-all-names)))) - (candidates . helm-bookmarks-cache) - (filtered-candidate-transformer . helm-bookmark-transformer) - (match . helm-bookmark-match-fn) - (type . bookmark)) + (helm-build-in-buffer-source + "Bookmarks" + :data (bookmark-all-names) + :filtered-candidate-transformer 'helm-bookmark-transformer + :search 'helm-bookmark-search-fn + :type 'bookmark) "See (info \"(emacs)Bookmarks\").") (defun helm-bookmark-transformer (candidates _source) @@ -163,11 +155,6 @@ (defvar helm-source-pp-bookmarks '((name . "PP-Bookmarks") (init . (lambda () - (require 'bookmark) - (setq helm-bookmark-mode-line-string - (list (car helm-bookmark-mode-line-string) - (replace-regexp-in-string "Sort:\\[.*\\] " "" - (cadr helm-bookmark-mode-line-string)))) (helm-init-candidates-in-buffer 'global (cl-loop for b in (bookmark-all-names) collect (propertize b 'location (bookmark-location b)))))) |