From: Alan Mackenzie <acm@muc.de>
To: Leo <sdl.web@gmail.com>, Stefan Kangas <stefan@marxist.se>
Cc: 12263@debbugs.gnu.org
Subject: bug#12263: 24.2; c-at-expression-start-p
Date: Fri, 1 Nov 2019 11:26:36 +0000 [thread overview]
Message-ID: <20191101112636.GA6473@ACM> (raw)
In-Reply-To: <87sgn9vmyi.fsf@joffe.skangas.se>
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 <sdl.web@gmail.com> 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).
next prev parent reply other threads:[~2019-11-01 11:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 1:33 bug#12263: 24.2; c-at-expression-start-p Leo
2019-10-30 23:21 ` Stefan Kangas
2019-11-01 11:26 ` Alan Mackenzie [this message]
2019-11-01 13:29 ` Leo Liu
2019-11-03 10:11 ` Stefan Kangas
[not found] ` <20191101112636.GA6473__22786.3558496878$1572607651$gmane$org@ACM>
2019-11-03 2:57 ` Leo Liu
2020-07-04 16:43 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191101112636.GA6473@ACM \
--to=acm@muc.de \
--cc=12263@debbugs.gnu.org \
--cc=sdl.web@gmail.com \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).