unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12263: 24.2; c-at-expression-start-p
@ 2012-08-23  1:33 Leo
  2019-10-30 23:21 ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Leo @ 2012-08-23  1:33 UTC (permalink / raw)
  To: 12263; +Cc: bug-cc-mode

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

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

[-- Attachment #2: t.m --]
[-- Type: text/plain, Size: 131 bytes --]

@interface ZXITFReader : ZXOneDReader

- (NSArray *)decodeStart:(ZXBitArray *)row;
- (NSArray *)decodeEnd:(ZXBitArray *)row;

@end

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12263: 24.2; c-at-expression-start-p
  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
       [not found]   ` <20191101112636.GA6473__22786.3558496878$1572607651$gmane$org@ACM>
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Kangas @ 2019-10-30 23:21 UTC (permalink / raw)
  To: Leo; +Cc: Alan Mackenzie, 12263

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.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12263: 24.2; c-at-expression-start-p
  2019-10-30 23:21 ` Stefan Kangas
@ 2019-11-01 11:26   ` Alan Mackenzie
  2019-11-01 13:29     ` Leo Liu
  2019-11-03 10:11     ` Stefan Kangas
       [not found]   ` <20191101112636.GA6473__22786.3558496878$1572607651$gmane$org@ACM>
  1 sibling, 2 replies; 7+ messages in thread
From: Alan Mackenzie @ 2019-11-01 11:26 UTC (permalink / raw)
  To: Leo, Stefan Kangas; +Cc: 12263

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).





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12263: 24.2; c-at-expression-start-p
  2019-11-01 11:26   ` Alan Mackenzie
@ 2019-11-01 13:29     ` Leo Liu
  2019-11-03 10:11     ` Stefan Kangas
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Liu @ 2019-11-01 13:29 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 12263, Stefan Kangas


> On 1 Nov 2019, at 19:26, Alan Mackenzie <acm@muc.de> wrote:
> 
> 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.

This sounds like a plan.  I will check what I use it for in 2-3 days when I will have proper internet connection.  But I think I can live with the breakage.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12263: 24.2; c-at-expression-start-p
       [not found]   ` <20191101112636.GA6473__22786.3558496878$1572607651$gmane$org@ACM>
@ 2019-11-03  2:57     ` Leo Liu
  2020-07-04 16:43       ` Alan Mackenzie
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Liu @ 2019-11-03  2:57 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 12263, Stefan Kangas

On 2019-11-01 11:26 +0000, Alan Mackenzie wrote:
> Leo, can you remember at all what (if anything) you were using this
> function for?

I used it once in my init script. But

> 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.

I can live with this change. Thanks for asking.

Leo





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12263: 24.2; c-at-expression-start-p
  2019-11-01 11:26   ` Alan Mackenzie
  2019-11-01 13:29     ` Leo Liu
@ 2019-11-03 10:11     ` Stefan Kangas
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2019-11-03 10:11 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 12263, Leo

Alan Mackenzie <acm@muc.de> writes:

> 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.

Sounds good to me.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12263: 24.2; c-at-expression-start-p
  2019-11-03  2:57     ` Leo Liu
@ 2020-07-04 16:43       ` Alan Mackenzie
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Mackenzie @ 2020-07-04 16:43 UTC (permalink / raw)
  To: Leo Liu; +Cc: Stefan Kangas, 12263-done

Hello, Leo.

On Sun, Nov 03, 2019 at 10:57:25 +0800, Leo Liu wrote:
> On 2019-11-01 11:26 +0000, Alan Mackenzie wrote:
> > Leo, can you remember at all what (if anything) you were using this
> > function for?

> I used it once in my init script. But

> > 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.

I've marked c-at-expression-start-p as obsolete.  I've got rid of a
formerly obsolete function entirely (might as well).
c-at-statement-start-p is actually used quite a bit in CC Mode, so it
stays.  ;-)

> I can live with this change. Thanks for asking.

I'm closing the bug with this post.

> Leo

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-04 16:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).