unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: 34420@debbugs.gnu.org
Subject: bug#34420: [PATCH 2/2] smerge-mode: new function to go to next conflict
Date: Mon, 11 Feb 2019 00:14:53 +0300	[thread overview]
Message-ID: <20190210211453.26816-2-Hi-Angel@yandex.ru> (raw)
In-Reply-To: <20190210211453.26816-1-Hi-Angel@yandex.ru>

* lisp/vc/smerge-mode.el (smerge-vc-next-conflict)
---
 lisp/vc/smerge-mode.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 929cd85432a..8ac0b3ed370 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1435,6 +1435,18 @@ smerge-start-session
         (smerge-next))
     (error (smerge-auto-leave))))
 
+(require 'vc)
+
+(defun smerge-vc-next-conflict ()
+  (interactive)
+  (let ((buffer (current-buffer)))
+    (when (not (smerge-goto-next-conflict))
+      (vc-find-conflicted-file)
+      (if (eq buffer (current-buffer))
+          (message "No conflicts found")
+        (goto-char 0)
+        (smerge-goto-next-conflict)))))
+
 (provide 'smerge-mode)
 
 ;;; smerge-mode.el ends here
-- 
2.20.1






  reply	other threads:[~2019-02-10 21:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-10 21:14 bug#34421: [PATCH 1/2] smerge-mode: factor out going to next conflict Konstantin Kharlamov
2019-02-10 21:14 ` Konstantin Kharlamov [this message]
2019-02-10 22:30   ` bug#34420: [PATCH v2 2/2] smerge-mode: new function to go " Konstantin Kharlamov
2019-02-13 21:44   ` bug#34420: [PATCH " Konstantin Kharlamov
2019-02-16  7:32     ` Eli Zaretskii
2019-02-16  7:32     ` Eli Zaretskii
2019-02-16 13:41       ` Stefan Monnier
2019-02-17  9:18         ` Konstantin Kharlamov
2019-02-17 15:37           ` Eli Zaretskii
2019-02-17 15:59             ` Konstantin Kharlamov
2019-02-18  3:22           ` Stefan Monnier
2019-02-18 17:49             ` Stefan Monnier
2019-02-18 21:12               ` hi-angel
2019-02-18 21:51                 ` Stefan Monnier
2019-02-18 22:01                   ` hi-angel
2019-02-18 23:28                     ` Stefan Monnier

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=20190210211453.26816-2-Hi-Angel@yandex.ru \
    --to=hi-angel@yandex.ru \
    --cc=34420@debbugs.gnu.org \
    /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).