From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: patch for smerge buglet Date: Sun, 04 May 2008 18:08:51 -0600 Message-ID: Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209946148 6981 80.91.229.12 (5 May 2008 00:09:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 May 2008 00:09:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 05 02:09:44 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JsoH1-0007MX-Ti for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 02:09:44 +0200 Original-Received: from localhost ([127.0.0.1]:52007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsoGK-0002uQ-7a for ged-emacs-devel@m.gmane.org; Sun, 04 May 2008 20:09:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsoGG-0002u6-TJ for emacs-devel@gnu.org; Sun, 04 May 2008 20:08:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsoGG-0002tu-9S for emacs-devel@gnu.org; Sun, 04 May 2008 20:08:56 -0400 Original-Received: from [199.232.76.173] (port=43633 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsoGG-0002tr-66 for emacs-devel@gnu.org; Sun, 04 May 2008 20:08:56 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JsoGG-0005f7-3r for emacs-devel@gnu.org; Sun, 04 May 2008 20:08:56 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m4508rxC029408 for ; Sun, 4 May 2008 20:08:53 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m4508raa021180; Sun, 4 May 2008 20:08:53 -0400 Original-Received: from opsy.redhat.com (vpn-14-213.rdu.redhat.com [10.11.14.213]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m4508qLu026379; Sun, 4 May 2008 20:08:52 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 100E13781B2; Sun, 4 May 2008 18:08:52 -0600 (MDT) X-Attribution: Tom User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96467 Archived-At: In a vc-dir buffer I used "f" to open a ChangeLog file that had a conflict. As often happens with ChangeLog, the conflict was on the very first line of the file. To my surprise, the file was visited with point at EOF. This patch to smerge-mode fixed the problem for me. Tom 2008-05-05 Tom Tromey * smerge-mode.el (smerge-start-session): Don't call smerge-next if looking at conflict marker. *** smerge-mode.el.~1.66.~ 2008-04-17 13:32:08.000000000 -0600 --- smerge-mode.el 2008-05-04 18:06:19.000000000 -0600 *************** *** 1227,1233 **** If no conflict maker is found, turn off `smerge-mode'." (smerge-mode 1) (condition-case nil ! (smerge-next) (error (smerge-auto-leave)))) (provide 'smerge-mode) --- 1227,1234 ---- If no conflict maker is found, turn off `smerge-mode'." (smerge-mode 1) (condition-case nil ! (unless (looking-at smerge-begin-re) ! (smerge-next)) (error (smerge-auto-leave)))) (provide 'smerge-mode)