From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#12263: 24.2; c-at-expression-start-p Date: Fri, 1 Nov 2019 11:26:36 +0000 Message-ID: <20191101112636.GA6473@ACM> References: <87sgn9vmyi.fsf@joffe.skangas.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="11000"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 12263@debbugs.gnu.org To: Leo , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 01 12:27:14 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQV5F-0002eB-BY for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 12:27:13 +0100 Original-Received: from localhost ([::1]:37858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQV5E-0004HZ-02 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 07:27:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54805) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQV57-0004Gg-I2 for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 07:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQV56-00049n-IU for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 07:27:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQV54-00048o-Fd; Fri, 01 Nov 2019 07:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQV54-0003zn-80; Fri, 01 Nov 2019 07:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 01 Nov 2019 11:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12263 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: confirmed Original-Received: via spool by 12263-submit@debbugs.gnu.org id=B12263.157260760215329 (code B ref 12263); Fri, 01 Nov 2019 11:27:02 +0000 Original-Received: (at 12263) by debbugs.gnu.org; 1 Nov 2019 11:26:42 +0000 Original-Received: from localhost ([127.0.0.1]:55099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQV4j-0003zA-Pg for submit@debbugs.gnu.org; Fri, 01 Nov 2019 07:26:42 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:10003 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iQV4h-0003z1-MM for 12263@debbugs.gnu.org; Fri, 01 Nov 2019 07:26:40 -0400 Original-Received: (qmail 41060 invoked by uid 3782); 1 Nov 2019 11:26:37 -0000 Original-Received: from acm.muc.de (p4FE15DFE.dip0.t-ipconnect.de [79.225.93.254]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Nov 2019 12:26:36 +0100 Original-Received: (qmail 6547 invoked by uid 1000); 1 Nov 2019 11:26:36 -0000 Content-Disposition: inline In-Reply-To: <87sgn9vmyi.fsf@joffe.skangas.se> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:170597 Archived-At: Hello, Leo and Stefan. On Thu, Oct 31, 2019 at 00:21:41 +0100, Stefan Kangas wrote: > tags 12263 + confirmed > found 12263 26.1 > found 12263 27.0.50 > thanks > Leo writes: > > 1. Emacs -q t.m > > 2. Move point to the first '-' > > 3. M-: (c-at-expression-start-p) > > 4. Move point to the second '-' > > 5. M-: (c-at-expression-start-p) > > step 3 return nil but step 5 returns non-nil. It appears that every > > first method declaration fails c-at-expression-start-p. > > Leo > > @interface ZXITFReader : ZXOneDReader > > - (NSArray *)decodeStart:(ZXBitArray *)row; > > - (NSArray *)decodeEnd:(ZXBitArray *)row; > > @end > I can reproduce this on current master and 26.1. Yes. c-at-expression-start-p is a strange function. It is not interactive, yet is not used at all by CC Mode. A web search found no uses of it (though I don't really trust web searches). The function's documentation also defines "expression" somewhat idiosyncratically as: "An \"expression\" here is a bit different from the normal language grammar sense: It's any sequence of expression tokens except commas, unless they are enclosed inside parentheses of some kind." . With that definition of "expression", there is no bug here, since there is nothing before that "-" to terminate any "previous expression". However, this redefinition of "expression" hardly seems defendable - it seems to have been made mainly for the convenience in coding. Leo, can you remember at all what (if anything) you were using this function for? Given that it appears to be wholly unused, I'm inclined to mark this function as obsolete or deprecated, and then to remove it later. It doesn't seem to be worth the trouble to make it work properly. The same might also apply to the function c-at-statement-start-p. > Best regards, > Stefan Kangas -- Alan Mackenzie (Nuremberg, Germany).