[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed 489bbea 130/389: Remove subed-milliseconds-move
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed 489bbea 130/389: Remove subed-milliseconds-move |
Date: |
Fri, 3 Dec 2021 11:00:11 -0500 (EST) |
branch: elpa/subed
commit 489bbeaa0ef72b13944b878d592c9c001bd11b72
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
Remove subed-milliseconds-move
Use subed-milliseconds-adjust for adjusting and moving (and shifting in the
future).
---
subed/subed-config.el | 30 +++++-------------------------
subed/subed.el | 24 ++++++++++++------------
2 files changed, 17 insertions(+), 37 deletions(-)
diff --git a/subed/subed-config.el b/subed/subed-config.el
index fc1cedd..275b7e3 100644
--- a/subed/subed-config.el
+++ b/subed/subed-config.el
@@ -112,12 +112,12 @@ The first existing file is then passed to
`subed-open-video'."
(defcustom subed-milliseconds-adjust 100
"Number of milliseconds to add/subtract to subtitle start/stop
-time with `subed-increase-start-time',
-`subed-decrease-start-time', `subed-increase-stop-time' and
-`subed-decrease-stop-time'.
+times when adjust, moving or shifting subtitles.
-This variable is set if these functions are called with a prefix
-argument. See `subed-increase-start-time'."
+This variable is set if the functions that use this variable are
+called with a prefix argument. That makes the value of this
+variable persistent for the duration of the sessio. Use
+`setq-default' to change the default value."
:type 'float
:group 'subed)
@@ -131,26 +131,6 @@ default. Return (new) `subed-milliseconds-adjust' value."
(custom-reevaluate-setting 'subed-milliseconds-adjust))) ;; Reset to
default
subed-milliseconds-adjust)
-(defcustom subed-milliseconds-move 100
- "Number of milliseconds to provide to
-`subed-move-subtitle-forward' and `subed-move-subtitle-backward'
-by default.
-
-This variable is set if these functions are called with a prefix
-argument. See `subed-move-subtitle-forward'."
- :type 'float
- :group 'subed)
-
-(defun subed--get-milliseconds-move (arg)
- "Set `subed-milliseconds-move' to `arg' if it's a number. If `arg'
-is non-nil, reset `subed-milliseconds-move' to its default.
-Return (new) `subed-milliseconds-move' value."
- (cond ((integerp arg)
- (setq subed-milliseconds-move arg)) ;; Custom
movement
- ((not (eq nil arg))
- (custom-reevaluate-setting 'subed-milliseconds-move))) ;; Reset to
default
- subed-milliseconds-move)
-
(defcustom subed-playback-speed-while-typing 0.3
"Video playback speed while the user is editing the buffer. If
diff --git a/subed/subed.el b/subed/subed.el
index 5f55603..68bda13 100644
--- a/subed/subed.el
+++ b/subed/subed.el
@@ -176,17 +176,17 @@ Before BODY is run, point is placed on the subtitle's ID."
;;; Moving subtitles
(defun subed-move-subtitle-forward (&optional arg)
- "Move subtitle `subed-milliseconds-move' forward in time while
-preserving its duration, i.e. increase start and stop time by the
-same amount.
+ "Move subtitle `subed-milliseconds-adjust' forward in time
+while preserving its duration, i.e. increase start and stop time
+by the same amount.
If the region is active, all subtitles that are fully or
partially in it are moved.
-The first step is to set `subed-milliseconds-move' to the value of the
-prefix argument if it is provided and if it is a number. If the
-prefix argument is provided but not numerical,
-`subed-milliseconds-move' is reset to its default value.
+The first step is to set `subed-milliseconds-adjust' to the value
+of the prefix argument if it is provided and if it is a number.
+If the prefix argument is provided but not numerical,
+`subed-milliseconds-adjust' is reset to its default value.
Example usage:
\\[universal-argument] 1000 \\[subed-move-subtitle-forward] Move subtitle
1000ms forward in time
@@ -197,7 +197,7 @@ Example usage:
\\[subed-move-subtitle-forward] Move subtitle 100ms (the default)
forward in time again"
(interactive "P")
(let ((deactivate-mark nil)
- (msecs (subed--get-milliseconds-move arg))
+ (msecs (subed--get-milliseconds-adjust arg))
(beg (when (use-region-p) (region-beginning)))
(end (when (use-region-p) (region-end))))
(subed--with-subtitle-replay-disabled
@@ -210,14 +210,14 @@ Example usage:
(subed-mpv-jump (subed--subtitle-msecs-start))))))
(defun subed-move-subtitle-backward (&optional arg)
- "Move subtitle `subed-milliseconds-move' backward in time while
-preserving its duration, i.e. decrease start and stop time by the
-same amount.
+ "Move subtitle `subed-milliseconds-adjust' backward in time
+while preserving its duration, i.e. decrease start and stop time
+by the same amount.
See `subed-move-subtitle-forward'."
(interactive "P" (if (use-region-p) (list (region-beginning) (region-end))))
(let ((deactivate-mark nil)
- (msecs (* -1 (subed--get-milliseconds-move arg)))
+ (msecs (* -1 (subed--get-milliseconds-adjust arg)))
(beg (when (use-region-p) (region-beginning)))
(end (when (use-region-p) (region-end))))
(subed--with-subtitle-replay-disabled
- [nongnu] elpa/subed 81aca87 008/389: Be more robust when moving forward/backward to subtitle text, (continued)
- [nongnu] elpa/subed 81aca87 008/389: Be more robust when moving forward/backward to subtitle text, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8e4bd20 069/389: Fix indentation, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6e525b9 079/389: Add screenshot, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed bf9ceeb 094/389: Reduce word count by 1, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 42199eb 095/389: Workaround for GitHub's lack of support for ~~/path/in/home~, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5c51000 101/389: Call time-adjusted-hook functions with start time, not stop time, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 53d1e33 102/389: Fix error when adjusting start/stop time in empty buffer, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a0cb0f1 108/389: Keep region active during subtitle movement, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 2c7554a 109/389: Wrap subed--for-each-subtitle in atomic-change-group, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed e792e0f 122/389: Fix test description, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 489bbea 130/389: Remove subed-milliseconds-move,
ELPA Syncer <=
- [nongnu] elpa/subed a7dda70 137/389: Add subtitle shifting to features, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a819a93 139/389: Fix test description, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 06851d8 143/389: Prevent overlapping when adjusting subtitle start/stop time, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 651c6de 031/389: Wrap some function bodies in save-match-data, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 57c902a 068/389: subed-srt-sanitize: Don't change buffer unless it's necessary, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 1571de4 070/389: Use prefix arg to set start/stop time adjustment, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed f832a1d 075/389: Add more tests for subed-srt-move-to-subtitle-end, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8374498 076/389: README: Split feature list and some rewording, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d0708e5 080/389: Fix screenshot, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 03cd2bf 097/389: Wrap msecs-to-timestamp in save-match-data, ELPA Syncer, 2021/12/03