aboutsummaryrefslogtreecommitdiff
path: root/emms-mark.el
diff options
context:
space:
mode:
Diffstat (limited to 'emms-mark.el')
-rw-r--r--emms-mark.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/emms-mark.el b/emms-mark.el
index d4d917e..9d71cef 100644
--- a/emms-mark.el
+++ b/emms-mark.el
@@ -152,6 +152,7 @@ description function.")
(forward-line 1)))))
(defsubst emms-mark-has-markedp ()
+ "Predicate whether the playlist has marked line"
(save-excursion
(goto-char (point-min))
(re-search-forward (format "^[%c]" emms-mark-char) nil t)))
@@ -160,7 +161,13 @@ description function.")
;;{{{ functions to operate marked tracks
(defun emms-mark-do-with-marked-track (func &optional move)
- "If your function don't move forward, set move to non-nil."
+ "Call FUNC on every marked line in current playlist. The FUNC take
+no argument, so if need the track in marked line, should use
+`emms-playlist-track-at' to get it. The FUNC can also modify the
+playlist buffer, such as delete the line. It is import for who want to
+use this function, this function didn't move forward. So if FUNC don't
+move forward, set the third parameter MOVE to non-nil. Otherwise, the
+function will never exit the loop."
(let ((regexp (format "^[%c]" emms-mark-char))
(newfunc func))
(if move
@@ -172,6 +179,9 @@ description function.")
(funcall newfunc)))))
(defun emms-mark-mapcar-marked-track (func &optional move)
+ "This function does the same thing as
+`emms-mark-do-with-marked-track', the only difference is this function
+collect the result of FUNC."
(let ((regexp (format "^[%c]" emms-mark-char))
result (newfunc func))
(if move