From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: beginning-of-defun-comments bug [was: Re: 26.0.90: mark-defun problem in c-mode] Date: Sat, 30 Dec 2017 12:01:36 +0000 Message-ID: <20171230120136.GD10623@ACM> References: <834lo8fqyi.fsf@gnu.org> <20171230103432.GB10623@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1514635393 27254 195.159.176.226 (30 Dec 2017 12:03:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2017 12:03:13 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: zhang cc , Noam Postavsky , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 30 13:03:08 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVFr2-0006gR-Mi for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2017 13:03:08 +0100 Original-Received: from localhost ([::1]:52004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVFsz-0006IX-V9 for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2017 07:05:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVFst-0006IG-L7 for emacs-devel@gnu.org; Sat, 30 Dec 2017 07:05:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVFsp-0002AZ-Mq for emacs-devel@gnu.org; Sat, 30 Dec 2017 07:05:03 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:28595 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eVFsp-00028h-C8 for emacs-devel@gnu.org; Sat, 30 Dec 2017 07:04:59 -0500 Original-Received: (qmail 9942 invoked by uid 3782); 30 Dec 2017 12:04:58 -0000 Original-Received: from acm.muc.de (p548C69B7.dip0.t-ipconnect.de [84.140.105.183]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 30 Dec 2017 13:04:54 +0100 Original-Received: (qmail 11579 invoked by uid 1000); 30 Dec 2017 12:01:36 -0000 Content-Disposition: inline In-Reply-To: <20171230103432.GB10623@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221469 Archived-At: Hello, Eli. On Sat, Dec 30, 2017 at 10:34:32 +0000, Alan Mackenzie wrote: > On Sat, Dec 30, 2017 at 12:30:29 +0200, Eli Zaretskii wrote: > > > From: zhang cc > > > Date: Sat, 30 Dec 2017 09:49:17 +0000 > > > When cursor is in the second function body, mark-defun can’t mark > > > the second function. > > "M-x mark-defun" works fine here with your example. Where exactly > > should cursor be in the second function body to reproduce the problem? > I see the error, with point anywhere in the body of the second function. > Critical seems to be there being no blank line between the functions. > I think there's a bug in beginning-of-defun-comments, which I'm in the > middle of edebugging. It moves point into the first function. beginning-of-defun-comments has a bug. On doing M-x beginning-of-defun-comments from the inside of a function, when there's no blank lines between it and the previous function, point ends up inside that previous function, not at the comments which may separate them. Perhaps this bug should be fixed before the next Emacs-26 pretest. -- Alan Mackenzie (Nuremberg, Germany).