[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/wgrep 0ebf0781f8 4/8: Merge branch 'obsolete' of github.co
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/wgrep 0ebf0781f8 4/8: Merge branch 'obsolete' of github.com:tarsiiformes/wgrep into tarsiiformes-obsolete |
Date: |
Wed, 1 Feb 2023 05:00:38 -0500 (EST) |
branch: elpa/wgrep
commit 0ebf0781f81a758d6df34d5ce0c9d7723f176239
Merge: acea5b6902 1f2a335b9c
Author: Masahiro Hayashi <mhayashi1120@gmail.com>
Commit: Masahiro Hayashi <mhayashi1120@gmail.com>
Merge branch 'obsolete' of github.com:tarsiiformes/wgrep into
tarsiiformes-obsolete
---
wgrep-ag.el | 12 ++++++------
wgrep-subtest.el | 1 -
wgrep.el | 39 ++++++++++++++++++++-------------------
3 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/wgrep-ag.el b/wgrep-ag.el
index 2cd9e8f39f..1ea4372722 100644
--- a/wgrep-ag.el
+++ b/wgrep-ag.el
@@ -67,14 +67,14 @@ when you manage to call ag with --nogroup.")
(goto-char (point-min))
;; Look for the first useful result line.
(if (re-search-forward (concat wgrep-ag-grouped-result-file-regexp
- "\\|"
- wgrep-ag-ungrouped-result-regexp))
- (add-text-properties (point-min) (line-beginning-position)
- '(read-only t wgrep-header t))
+ "\\|"
+ wgrep-ag-ungrouped-result-regexp))
+ (add-text-properties (point-min) (line-beginning-position)
+ '(read-only t wgrep-header t))
;; No results in this buffer, let's mark the whole thing as
;; header.
(add-text-properties (point-min) (point-max)
- '(read-only t wgrep-header t)))
+ '(read-only t wgrep-header t)))
;; OK, header dealt with. Now let's try find the footer.
(goto-char (point-max))
@@ -87,7 +87,7 @@ when you manage to call ag with --nogroup.")
;; footer.
(when (zerop (forward-line 1))
(add-text-properties (point) (point-max)
- '(read-only t wgrep-footer t)))))
+ '(read-only t wgrep-footer t)))))
(defun wgrep-ag-parse-command-results ()
;; Note that this function is called with the buffer narrowed to
diff --git a/wgrep-subtest.el b/wgrep-subtest.el
index 7e4974a505..17529d3677 100644
--- a/wgrep-subtest.el
+++ b/wgrep-subtest.el
@@ -28,4 +28,3 @@
(wgrep-save-all-buffers)
;; compare file contents is valid
(should (equal "FOO2\nBAZ\n" (wgrep-test--get-contents file)))))))
-
diff --git a/wgrep.el b/wgrep.el
index e9833d7d46..1dc7176e5f 100644
--- a/wgrep.el
+++ b/wgrep.el
@@ -262,7 +262,8 @@ non editable region.")
string)))
(defun wgrep-delete-whole-line ()
- (delete-region (point-at-bol) (point-at-bol 2)))
+ (delete-region (line-beginning-position)
+ (line-beginning-position 2)))
(defun wgrep-goto-line (line)
(goto-char (point-min))
@@ -338,7 +339,7 @@ non editable region.")
(goto-char next)
(while (and (not (eobp))
(or (null (setq fn (get-text-property
- (point-at-bol)
+ (line-beginning-position)
'wgrep-line-filename)))
(string= fn file)))
(when fn
@@ -357,7 +358,7 @@ non editable region.")
(with-current-buffer wgrep-sibling-buffer
(when (wgrep-goto-grep-line file number)
(buffer-substring-no-properties
- (point) (point-at-eol))))))
+ (point) (line-end-position))))))
;;;
;;; Prepare and parse grep <-> wgrep
@@ -469,8 +470,8 @@ non editable region.")
(while (looking-at (format "^%s[-\0]%d-" fregexp next))
(let ((start (match-beginning 0))
(end (match-end 0))
- (bol (point-at-bol))
- (eol (point-at-eol)))
+ (bol (line-beginning-position))
+ (eol (line-end-position)))
(put-text-property start end 'wgrep-line-filename filename)
(put-text-property start end 'wgrep-line-number next)
(put-text-property start (+ start flen) fprop filename)
@@ -513,9 +514,9 @@ non editable region.")
(forward-line -1))))
(t
;; Add property but this may be removed by
`wgrep-prepare-context-while'
- (put-text-property
- (point-at-bol) (point-at-eol)
- 'wgrep-ignore t)))
+ (put-text-property (line-beginning-position)
+ (line-end-position)
+ 'wgrep-ignore t)))
(forward-line 1))))
(defun wgrep-current-file-and-linum ()
@@ -600,15 +601,15 @@ non editable region.")
;; get overlay BEG and END is passed by `after-change-functions'
(defun wgrep-editing-overlay (&optional start end)
- (let ((beg (or start (point-at-bol)))
- (fin (or end (point-at-eol)))
+ (let ((beg (or start (line-beginning-position)))
+ (fin (or end (line-end-position)))
ov bol eol
;; beginning/end of grep
bog eog)
(goto-char beg)
- (setq bol (point-at-bol))
+ (setq bol (line-beginning-position))
(goto-char fin)
- (setq eol (point-at-eol))
+ (setq eol (line-end-position))
(catch 'done
(dolist (o (overlays-in bol eol))
;; find overlay that have changed by user.
@@ -734,7 +735,7 @@ non editable region.")
(defun wgrep-replace-to-new-line (new-text)
;; delete grep extracted region (restricted to a line)
- (delete-region (point-at-bol) (point-at-eol))
+ (delete-region (line-beginning-position) (line-end-position))
(let ((beg (point))
end)
(insert new-text)
@@ -746,7 +747,7 @@ non editable region.")
(defun wgrep-flush-whole-line ()
(wgrep-put-overlay-to-file-buffer
- (point-at-bol) (point-at-eol))
+ (line-beginning-position) (line-end-position))
(wgrep-delete-whole-line))
;; EDITOR ::= FILE (absolute-path) . EDITS
@@ -764,7 +765,7 @@ non editable region.")
(let* ((name (get-text-property (point) 'wgrep-line-filename))
(linum (get-text-property (point) 'wgrep-line-number))
(start (next-single-property-change
- (point) 'wgrep-line-filename nil (point-at-eol)))
+ (point) 'wgrep-line-filename nil (line-end-position)))
(file (expand-file-name name default-directory))
(file-error nil)
(old (overlay-get edit-field 'wgrep-old-text))
@@ -905,7 +906,7 @@ NEW may be nil this means deleting whole line."
;; Check buffer line was modified after execute grep.
(unless (string= old
(buffer-substring-no-properties
- (point-at-bol) (point-at-eol)))
+ (line-beginning-position) (line-end-position)))
(signal 'wgrep-error (list "Buffer was changed after grep.")))
(cond
(new
@@ -982,8 +983,8 @@ a file."
(defun wgrep-maybe-echo-error-at-point ()
(when (null (current-message))
(let ((ov (catch 'found
- (dolist (o (overlays-in
- (point-at-bol) (point-at-eol)))
+ (dolist (o (overlays-in (line-beginning-position)
+ (line-end-position)))
(when (overlay-get o 'wgrep-reject-message)
(throw 'found o))))))
(when ov
@@ -1009,7 +1010,7 @@ These changes are not immediately saved to disk unless
((> all-length wgrep-too-many-file-length)
(when (y-or-n-p (eval-when-compile
(concat
- "Edited files are too many."
+ "Edited files are too many."
" Apply the changes to disk with non-confirmation?")))
(setq wgrep-auto-apply-disk t))))
(while tran
- [nongnu] elpa/wgrep updated (f9687c28bb -> 712cfff548), ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep 0ebf0781f8 4/8: Merge branch 'obsolete' of github.com:tarsiiformes/wgrep into tarsiiformes-obsolete,
ELPA Syncer <=
- [nongnu] elpa/wgrep 6202978e74 5/8: Merge branch 'tarsiiformes-obsolete', ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep b5ed28d959 7/8: apply editorconfig, ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep f40e1edb48 1/8: Fix whitespace, ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep 1f2a335b9c 2/8: Use line-beginning-position instead of point-at-bol, ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep 712cfff548 8/8: add gitignore temporary directory created when unittest, ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep acea5b6902 3/8: add editorconfig, ELPA Syncer, 2023/02/01
- [nongnu] elpa/wgrep 3faf2e429e 6/8: revision up, ELPA Syncer, 2023/02/01