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 v2 2/2] smerge-mode: new function to go to next conflict Date: Mon, 11 Feb 2019 01:30:13 +0300 Message-ID: <20190210223013.20804-1-Hi-Angel@yandex.ru> References: <20190210211453.26816-2-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="172946"; 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 23:31:22 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 1gsxdB-000ito-NK for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Feb 2019 23:31:21 +0100 Original-Received: from localhost ([127.0.0.1]:37504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsxdA-0001SZ-Ha for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Feb 2019 17:31:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsxct-0001Rh-JH for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 17:31:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsxcs-0000UK-T9 for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 17:31:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gsxcs-0000Tb-9h for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 17:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gsxcs-0001Le-3o for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 17:31:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <20190210211453.26816-2-Hi-Angel@yandex.ru> Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Feb 2019 22:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34420 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 34420-submit@debbugs.gnu.org id=B34420.15498378305135 (code B ref 34420); Sun, 10 Feb 2019 22:31:02 +0000 Original-Received: (at 34420) by debbugs.gnu.org; 10 Feb 2019 22:30:30 +0000 Original-Received: from localhost ([127.0.0.1]:42920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsxcL-0001Kk-Ol for submit@debbugs.gnu.org; Sun, 10 Feb 2019 17:30:30 -0500 Original-Received: from forward106p.mail.yandex.net ([77.88.28.109]:52169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsxcI-0001KV-Se for 34420@debbugs.gnu.org; Sun, 10 Feb 2019 17:30:28 -0500 Original-Received: from mxback6g.mail.yandex.net (mxback6g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:167]) by forward106p.mail.yandex.net (Yandex) with ESMTP id DD7351C8038A for <34420@debbugs.gnu.org>; Mon, 11 Feb 2019 01:30:19 +0300 (MSK) Original-Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback6g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id JQKSAfZawG-UJw4hcDa; Mon, 11 Feb 2019 01:30:19 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1549837819; bh=g6FjR+QLW56+8aPeEqrF8COLEXxUCNiTLwtCrPoStZo=; h=From:To:Subject:Date:Message-Id; b=Ob//wrcsxXRpLPhPZ6KxTrwkKa4irSqyiB+YP3owPSlT5eCBIsfDGdCMGVFLfl3Gd COtsV5TgpC3zOZy3zdPd+2BG1rRHlsLiy5JCXa5Z3HZ6XoOhYDu6DNFE5ExwufFw4K nwYiLDSUQy8fb5HaEm5v0hBxoH8cPdkLOXpkal0E= Authentication-Results: mxback6g.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Kx9058Pnr0-UJpWsCX7; Mon, 11 Feb 2019 01:30:19 +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 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:155348 Archived-At: * lisp/vc/smerge-mode.el (smerge-vc-next-conflict) --- v2: added documentation for the function lisp/vc/smerge-mode.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 929cd85432a..0bc11fee23c 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1435,6 +1435,20 @@ smerge-start-session (smerge-next)) (error (smerge-auto-leave)))) +(require 'vc) + +(defun smerge-vc-next-conflict () + "Tries to go to next conflict in current file, otherwise tries +to open next conflicted file version-control-system wise" + (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