From unknown Fri Jun 20 07:23:00 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#34421 <34421@debbugs.gnu.org> To: bug#34421 <34421@debbugs.gnu.org> Subject: Status: [PATCH 1/2] smerge-mode: factor out going to next conflict Reply-To: bug#34421 <34421@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:23:00 +0000 retitle 34421 [PATCH 1/2] smerge-mode: factor out going to next conflict reassign 34421 emacs submitter 34421 Konstantin Kharlamov severity 34421 wishlist tag 34421 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 10 16:17:20 2019 Received: (at submit) by debbugs.gnu.org; 10 Feb 2019 21:17:20 +0000 Received: from localhost ([127.0.0.1]:42874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gswTW-0005mj-0I for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:17:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gswTT-0005hK-Vo for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:17:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:48654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gswTN-0004mY-FA for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:17:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gswTM-0000ss-BN for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:17:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gswRR-0003gw-HV for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:15:11 -0500 Received: from forward105o.mail.yandex.net ([2a02:6b8:0:1a2d::608]:50468) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gswRP-0003eq-CI for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 16:15:08 -0500 Received: from mxback12g.mail.yandex.net (mxback12g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:91]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 655454200454 for ; Mon, 11 Feb 2019 00:15:01 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback12g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id kYmKep19ol-F1We4Lid; 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=Pq8cRilZteQ2lhfyaQVi2ph4zP461YT1ZrQaTgmYVKU=; h=From:To:Subject:Date:Message-Id; b=KqU26fDFaXkagF+PrBcANdib5MNBWZ5hSivgADlq2fI7+pf1jeIv6xARquX5NwsPf eZlsKws6qeTIQe4kFwauh5bljYECEGwt+/YOYXQuM7zIdi6/PnrEQUGi3YgoI3vHca 6PIjrsGj85XBQyOHOjskkLWMNw5ZhHZ7b3gLlJ1o= Authentication-Results: mxback12g.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ppeUXVqyEA-F0p8ZQ2T; Mon, 11 Feb 2019 00:15:00 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Konstantin Kharlamov To: bug-gnu-emacs@gnu.org Subject: [PATCH 1/2] smerge-mode: factor out going to next conflict Date: Mon, 11 Feb 2019 00:14:52 +0300 Message-Id: <20190210211453.26816-1-Hi-Angel@yandex.ru> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:6b8:0:1a2d::608 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * lisp/vc/smerge-mode.el (smerge-goto-next-conflict) --- lisp/vc/smerge-mode.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 569797e18dd..929cd85432a 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -269,6 +269,9 @@ font-lock-keywords =20 (defconst smerge-match-names ["conflict" "upper" "base" "lower"]) =20 +(defsubst smerge-goto-next-conflict (&optional bound) + (re-search-forward smerge-begin-re bound t)) + (defun smerge-ensure-match (n) (unless (match-end n) (error "No `%s'" (aref smerge-match-names n)))) @@ -276,7 +279,7 @@ smerge-ensure-match (defun smerge-auto-leave () (when (and smerge-auto-leave (save-excursion (goto-char (point-min)) - (not (re-search-forward smerge-begin-re nil t)))) + (not (smerge-goto-next-conflict)))) (when (and (listp buffer-undo-list) smerge-mode) (push (list 'apply 'smerge-mode 1) buffer-undo-list)) (smerge-mode -1))) @@ -312,7 +315,7 @@ smerge-combine-with-next (push (if (match-end i) (copy-marker (match-end i) t)) ends)) (setq ends (apply 'vector ends)) (goto-char (aref ends 0)) - (if (not (re-search-forward smerge-begin-re nil t)) + (if (not (smerge-goto-next-conflict)) (error "No next conflict") (smerge-match-conflict) (let ((match-data (mapcar (lambda (m) (if m (copy-marker m))) @@ -407,7 +410,7 @@ smerge-popup-context-menu ;; There's no conflict at point, the text-props are just obsolete. (save-excursion (let ((beg (re-search-backward smerge-end-re nil t)) - (end (re-search-forward smerge-begin-re nil t))) + (end (smerge-goto-next-conflict))) (smerge-remove-props (or beg (point-min)) (or end (point-max))) (push event unread-command-events))))) =20 @@ -651,7 +654,7 @@ smerge-resolve-all (interactive) (save-excursion (goto-char (point-min)) - (while (re-search-forward smerge-begin-re nil t) + (while (smerge-goto-next-conflict) (condition-case nil (progn (smerge-match-conflict) @@ -812,7 +815,7 @@ smerge-match-conflict (cond ((save-excursion (goto-char upper-start) - (re-search-forward smerge-begin-re end t)) + (smerge-goto-next-conflict end)) ;; There's a nested conflict and we're after the beginning ;; of the outer one but before the beginning of the inner one. ;; Of course, maybe this is not a nested conflict but in that @@ -887,7 +890,7 @@ smerge-find-conflict (goto-char pos)))) ;; If we're not already inside a conflict, look for the next conflic= t ;; and add/update its overlay. - (while (and (not found) (re-search-forward smerge-begin-re limit t)) + (while (and (not found) (smerge-goto-next-conflict limit)) (condition-case nil (progn (smerge-match-conflict) --=20 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 11 13:01:33 2019 Received: (at control) by debbugs.gnu.org; 11 Feb 2019 18:01:33 +0000 Received: from localhost ([127.0.0.1]:44024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtFtc-0001fu-Q2 for submit@debbugs.gnu.org; Mon, 11 Feb 2019 13:01:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gtFtb-0001fH-7U for control@debbugs.gnu.org; Mon, 11 Feb 2019 13:01:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtFtW-00007G-1j for control@debbugs.gnu.org; Mon, 11 Feb 2019 13:01:26 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gtFtU-00009r-Jt for control@debbugs.gnu.org; Mon, 11 Feb 2019 13:01:25 -0500 Subject: control message for bug 34421 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Mon, 11 Feb 2019 13:01:24 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) merge 34420 34421 severity 34421 wishlist From unknown Fri Jun 20 07:23:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 19 Mar 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator