[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed fd737b7 035/389: Use save-excursion in subed--save-e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed fd737b7 035/389: Use save-excursion in subed--save-excursion |
Date: |
Fri, 3 Dec 2021 10:59:52 -0500 (EST) |
branch: elpa/subed
commit fd737b7c9e108d06da3ed2ad21f1619a749de433
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
Use save-excursion in subed--save-excursion
---
subed/subed.el | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/subed/subed.el b/subed/subed.el
index f94f887..6935914 100644
--- a/subed/subed.el
+++ b/subed/subed.el
@@ -369,16 +369,17 @@ buffer."
"Restore relative point within current subtitle after executing BODY.
This also works if the buffer changes as long the subtitle IDs
don't change."
- `(let ((sub-id (subed--subtitle-id))
- (sub-pos (subed--subtitle-relative-point)))
- (progn ,@body)
- (subed-move-to-subtitle-id sub-id)
- ;; Subtitle text may have changed and we may not be able to move to the
- ;; exact original position
- (condition-case nil
- (forward-char sub-pos)
- ('beginning-of-buffer nil)
- ('end-of-buffer nil))))
+ (save-excursion
+ `(let ((sub-id (subed--subtitle-id))
+ (sub-pos (subed--subtitle-relative-point)))
+ (progn ,@body)
+ (subed-move-to-subtitle-id sub-id)
+ ;; Subtitle text may have changed and we may not be able to move to the
+ ;; exact original position
+ (condition-case nil
+ (forward-char sub-pos)
+ ('beginning-of-buffer nil)
+ ('end-of-buffer nil)))))
(defun subed-guess-video-file ()
"Return path to video if replacing the buffer file name's
- [nongnu] elpa/subed 8a39911 024/389: Use let instead of setq, (continued)
- [nongnu] elpa/subed 8a39911 024/389: Use let instead of setq, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 78d3855 026/389: subed-srt-move-to-subtitle-id: Use let instead of setq, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c895b91 012/389: Add test for sanitizing on empty subtitle texts, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6797d10 028/389: Use lexical scoping, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7939e0a 022/389: Move function to have same order as tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 31f8255 016/389: README: Turns out spaces are not the issue, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 27c8141 014/389: Some work on README, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6b97e24 023/389: Fix test's description, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7e04e16 013/389: Use C-u ... when inserting subtitles, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 005c0cc 027/389: Remove TODO for C-u N M-k, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed fd737b7 035/389: Use save-excursion in subed--save-excursion,
ELPA Syncer <=
- [nongnu] elpa/subed 0815e10 047/389: Simplify subed-srt--regexp-duration, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed bbd239a 042/389: subed-srt--regenerate-ids: Wrap function body in atomic-change-group, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8790abf 048/389: Add subed-srt-validate, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7d76a35 049/389: Simplify subed-srt-move-to-subtitle-text, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 821b259 045/389: subed-srt--regenerate-ids: Make this a public function, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d3d2013 050/389: Look for stop time only on the relevant line, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 042941c 051/389: Fix docstrings, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 4e50796 052/389: Fix subed-srt-backward-subtitle-id, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 86914b4 053/389: Add more tests for moving to next/previous subtitle ID, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6391996 056/389: Kill debugging buffer+window in subed-disable-debugging, ELPA Syncer, 2021/12/03