branch: elpa/subed commit fabc7dc43e043458aa1bb95dcd722dbd79850202 Author: Random User <rnd...@posteo.de> Commit: Random User <rnd...@posteo.de>
Move function around --- subed/subed-srt.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/subed/subed-srt.el b/subed/subed-srt.el index 06e5d29..2b5952c 100644 --- a/subed/subed-srt.el +++ b/subed/subed-srt.el @@ -176,6 +176,13 @@ See also `subed-srt--subtitle-id-at-msecs'." (when (and target-sub-id current-sub-id (not (= target-sub-id current-sub-id))) (subed-srt--jump-to-subtitle-id target-sub-id)))) +(defun subed-srt--jump-to-subtitle-text-at-msecs (msecs) + "Move point to the text of the subtitle that is playing at MSECS. +Return point or nil if point is still on the same subtitle. +See also `subed-srt--subtitle-id-at-msecs'." + (when (subed-srt--jump-to-subtitle-id-at-msecs msecs) + (subed-srt--jump-to-subtitle-text))) + (defun subed-srt--jump-to-subtitle-time-start (&optional sub-id) "Move point to subtitle's start time. If SUB-ID is not given, use subtitle on point. @@ -208,13 +215,6 @@ Return point or nil if a the subtitle's text can't be found." (forward-line 2) (point))) -(defun subed-srt--jump-to-subtitle-text-at-msecs (msecs) - "Move point to the text of the subtitle that is playing at MSECS. -Return point or nil if point is still on the same subtitle. -See also `subed-srt--subtitle-id-at-msecs'." - (when (subed-srt--jump-to-subtitle-id-at-msecs msecs) - (subed-srt--jump-to-subtitle-text))) - (defun subed-srt--jump-to-subtitle-end (&optional sub-id) "Move point after the last character of the subtitle's text. If SUB-ID is not given, use subtitle on point.