Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* helm-bookmark.el: Add docstring and comments.

  • Loading branch information...
commit 417885509ee9ee541d0837c754d07d38cdb843d8 1 parent 8658abd
@thierryvolpiatto thierryvolpiatto authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 helm-bookmark.el
View
9 helm-bookmark.el
@@ -111,10 +111,13 @@
else collect i))
(defun helm-bookmark-match-fn (candidate)
+ "Match function for bookmark sources using `candidates'."
(if helm-bookmark-show-location
+ ;; match only location, match-plugin will match also name.
(string-match helm-pattern (bookmark-location candidate))
(string-match helm-pattern candidate)))
+;;;###autoload
(defun helm-bookmark-toggle-filename ()
(interactive)
(let ((real (helm-get-selection helm-buffer)))
@@ -158,15 +161,19 @@
"See (info \"(emacs)Bookmarks\").")
(defun helm-bookmark-search-fn (pattern)
+ "Search function for bookmark sources using `candidates-in-buffer'.
+Should be used with `helm-pp-bookmark-match-fn' as `match-part' function."
(if helm-bookmark-show-location
(helm-aif (next-single-property-change (point) 'location)
(goto-char it))
(re-search-forward pattern nil t)))
(defun helm-pp-bookmark-match-fn (candidate)
+ "Search function for bookmark sources using `candidates-in-buffer'.
+Should be used with `helm-bookmark-search-fn' as `search' function."
(helm-aif (and helm-bookmark-show-location
(bookmark-location candidate))
- it
+ it ; match only location, match-plugin will match also name.
candidate))
(defun helm-highlight-bookmark (bookmarks source)
Please sign in to comment.
Something went wrong with that request. Please try again.