From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#34420: [PATCH 2/2] smerge-mode: new function to go to next conflict Date: Mon, 11 Feb 2019 00:14:53 +0300 Message-ID: <20190210211453.26816-2-Hi-Angel@yandex.ru> References: <20190210211453.26816-1-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134764"; mail-complaints-to="usenet@blaine.gmane.org" To: 34420@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 10 22:18:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gswUW-000Yue-VO for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Feb 2019 22:18:21 +0100 Original-Received: from localhost ([127.0.0.1]:36775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gswUV-0001LA-UW for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Feb 2019 16:18:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gswUK-0001Kh-F2 for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:18:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gswUJ-0005I3-Lc for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:18:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43593) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gswUE-0005DJ-V6 for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:18:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gswUE-0005xo-Jm for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Feb 2019 21:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34420 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154983343722191 (code B ref -1); Sun, 10 Feb 2019 21:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Feb 2019 21:17:17 +0000 Original-Received: from localhost ([127.0.0.1]:42872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gswTU-0005lW-Im for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:17:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gswTR-0005fB-H1 for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:17:15 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:40671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gswTK-0004kc-Nr for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:17:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gswTJ-0000sR-S8 for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gswRR-0003gr-HD for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:15:13 -0500 Original-Received: from forward102j.mail.yandex.net ([2a02:6b8:0:801:2::102]:41279) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gswRP-0003f8-CQ for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:15:07 -0500 Original-Received: from mxback11g.mail.yandex.net (mxback11g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:90]) by forward102j.mail.yandex.net (Yandex) with ESMTP id E88D5F210E3 for ; Mon, 11 Feb 2019 00:15:01 +0300 (MSK) Original-Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback11g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pBVv7VQc0q-F1gKo3JN; Mon, 11 Feb 2019 00:15:01 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1549833301; bh=EQndz1ikmiqmMHc7g04ZktSmOMBSCOymDIbwqTktvPM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References; b=Tq4aAZ78JfT6C/BggaE1sELhwjNeocab1Awnq4JWnaMuJYREQoQ+VE1pADrJ0lMgh cxNKVpD7VhxJhrs32YCdIACgYOdEJ+wLmfb0LsmLa8cB2LdlNib2mrr29yp60ztXap qTxxmB52E59X1ZZ3A07zEbMTPNeL0pi/70W0gnpk= Authentication-Results: mxback11g.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ppeUXVqyEA-F1pKinH6; Mon, 11 Feb 2019 00:15:01 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190210211453.26816-1-Hi-Angel@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155345 Archived-At: * 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)))) =20 +(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) =20 ;;; smerge-mode.el ends here --=20 2.20.1