[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/anzu 718d5845d1 126/288: Merge pull request #25 from syohe
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/anzu 718d5845d1 126/288: Merge pull request #25 from syohex/add-lines-region |
Date: |
Thu, 6 Jan 2022 03:58:46 -0500 (EST) |
branch: elpa/anzu
commit 718d5845d191a34fbd76df32cf725c68c424538d
Merge: 59fec57b13 cf07d6a0ec
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Merge pull request #25 from syohex/add-lines-region
Implement specified lines replacement
---
anzu.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/anzu.el b/anzu.el
index 953a12712d..f6c7977748 100644
--- a/anzu.el
+++ b/anzu.el
@@ -478,20 +478,23 @@
(and bound (cdr bound))))
(defun anzu--region-begin (use-region thing backward)
- (if thing
- (or (anzu--thing-begin thing) (point))
- (if use-region
- (region-beginning)
- (if backward
- (point-min)
- (point)))))
+ (cond (current-prefix-arg (line-beginning-position))
+ (thing (or (anzu--thing-begin thing) (point)))
+ (use-region (region-beginning))
+ (backward (point-min))
+ (t (point))))
+
+(defsubst anzu--line-end-position (num)
+ (save-excursion
+ (forward-line (1- num))
+ (line-end-position)))
(defun anzu--region-end (use-region thing)
- (if thing
- (or (anzu--thing-end thing) (point-max))
- (if use-region
- (region-end)
- (point-max))))
+ (cond (current-prefix-arg
+ (anzu--line-end-position (prefix-numeric-value current-prefix-arg)))
+ (thing (or (anzu--thing-end thing) (point-max)))
+ (use-region (region-end))
+ (t (point-max))))
(defun anzu--begin-thing (at-cursor thing)
(cond ((and at-cursor thing) thing)
- [nongnu] elpa/anzu eb2b4ec103 084/288: fix link, (continued)
- [nongnu] elpa/anzu eb2b4ec103 084/288: fix link, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 156980dc69 092/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu c7ecd57c24 095/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 91f3478003 097/288: Merge pull request #15 from syohex/fix-nonprefix-case, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 189c0eaf9f 101/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 0b3cf4b0a6 103/288: Merge pull request #17 from syohex/add-nonquery-replace-command, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 2a9785459b 111/288: Merge pull request #20 from syohex/enable-lexical-binding, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 8e92765ab7 113/288: Specify Emacs version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 8fe3d080ff 114/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 11dcdf722f 128/288: Use package-file instead of package, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 718d5845d1 126/288: Merge pull request #25 from syohex/add-lines-region,
ELPA Syncer <=
- [nongnu] elpa/anzu 485f463a40 127/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu ffcffffc1a 130/288: Merge pull request #26 from cedricporter/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 1ae7297bc7 132/288: Merge pull request #27 from syohex/fix-for-toggle-search, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu c0d58a61c2 136/288: A couple of grammar and typo fixes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 41f19cd2c2 214/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4426cff3bf 205/288: Correct removed hook function name, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu df60e608f1 233/288: Update document about update function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu e46563628d 234/288: Use "#'" instead of "'" for detecting typo, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 11544ea75c 242/288: Consider user's case-fold-search, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 42996934e2 239/288: Change syntax for bindings, ELPA Syncer, 2022/01/06