From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: 46538@debbugs.gnu.org
Cc: contovob@tcd.ie
Subject: bug#46538: [PATCH] vc: make smerge-vc-next-conflict wrap around
Date: Tue, 16 Feb 2021 01:25:04 +0300 [thread overview]
Message-ID: <20210215222504.281682-1-Hi-Angel@yandex.ru> (raw)
In-Reply-To: <87wnv9ta5i.fsf@tcd.ie>
* lisp/vc/smerge-mode.el:
(smerge-vc-next-conflict): While searching for conflict markers, wrap
search around if current file is the last one with conflicts.
---
lisp/vc/smerge-mode.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 3b09dfe5d2..b825fd9837 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1469,12 +1469,12 @@ smerge-vc-next-conflict
(if (and (buffer-modified-p) buffer-file-name)
(save-buffer))
(vc-find-conflicted-file)
- (if (eq buffer (current-buffer))
- ;; Do nothing: presumably `vc-find-conflicted-file' already
- ;; emitted a message explaining there aren't any more conflicts.
- nil
- (goto-char (point-min))
- (smerge-next)))))))
+ (when (eq buffer (current-buffer))
+ ;; try to find a conflict marker in current file above the point
+ (let ((prev-pos (point)))
+ (goto-char (point-min))
+ (unless (ignore-errors (not (smerge-next)))
+ (goto-char prev-pos)))))))))
(provide 'smerge-mode)
--
2.30.1
next prev parent reply other threads:[~2021-02-15 22:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 18:51 bug#46538: Patch: wrap around smerge-vc-next-conflict if current file still has conflicts Konstantin Kharlamov
2021-02-15 19:15 ` Basil L. Contovounesios
2021-02-15 22:00 ` Konstantin Kharlamov
2021-02-15 22:25 ` Konstantin Kharlamov [this message]
2021-02-16 11:50 ` bug#46538: [PATCH] vc: make smerge-vc-next-conflict wrap around Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210215222504.281682-1-Hi-Angel@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=46538@debbugs.gnu.org \
--cc=contovob@tcd.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).