unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* C mode strange coding style
@ 2003-02-18 23:02 kgold
  2003-02-20 19:56 ` Kai Großjohann
  0 siblings, 1 reply; 4+ messages in thread
From: kgold @ 2003-02-18 23:02 UTC (permalink / raw)



A co-worker uses a coding style for C functions like this:

long function_name
  (
   int var1,
   int var2
  )
  { ...

Neither font-lock nor imenu seem to identify functions when the
parameters are coded on a separate line after the (.

Is there any fix or work around?  
   

-- 
-- 
Ken Goldman   kgold@watson.ibm.com   914-784-7646

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

* Re: C mode strange coding style
  2003-02-18 23:02 C mode strange coding style kgold
@ 2003-02-20 19:56 ` Kai Großjohann
  2003-03-11 20:49   ` kgold
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2003-02-20 19:56 UTC (permalink / raw)


kgold@watson.ibm.com (kgold) writes:

> A co-worker uses a coding style for C functions like this:
>
> long function_name
>   (
>    int var1,
>    int var2
>   )
>   { ...
>
> Neither font-lock nor imenu seem to identify functions when the
> parameters are coded on a separate line after the (.

For imenu, the problem might be that the "{" is not at beginning of
line.  See defun-prompt-regexp -- does that help?
-- 
A preposition is not a good thing to end a sentence with.

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

* Re: C mode strange coding style
  2003-02-20 19:56 ` Kai Großjohann
@ 2003-03-11 20:49   ` kgold
  2003-03-12 14:31     ` Kai Großjohann
  0 siblings, 1 reply; 4+ messages in thread
From: kgold @ 2003-03-11 20:49 UTC (permalink / raw)



It didn't help yet.  I used customize to add a regexp equal to a
single space, saved for the current session, and clicked
index->rescan.  The function still does not appear.  Not being a
regexp expert, was that correct?

kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) writes:
> kgold@watson.ibm.com (kgold) writes:
> 
> > A co-worker uses a coding style for C functions like this:
> >
> > long function_name
> >   (
> >    int var1,
> >    int var2
> >   )
> >   { ...
> >
> > Neither font-lock nor imenu seem to identify functions when the
> > parameters are coded on a separate line after the (.
> 
> For imenu, the problem might be that the "{" is not at beginning of
> line.  See defun-prompt-regexp -- does that help?
> -- 
> A preposition is not a good thing to end a sentence with.

-- 
-- 
Ken Goldman   kgold@watson.ibm.com   914-784-7646

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

* Re: C mode strange coding style
  2003-03-11 20:49   ` kgold
@ 2003-03-12 14:31     ` Kai Großjohann
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-03-12 14:31 UTC (permalink / raw)


kgold@watson.ibm.com (kgold) writes:

> It didn't help yet.  I used customize to add a regexp equal to a
> single space, saved for the current session, and clicked
> index->rescan.  The function still does not appear.  Not being a
> regexp expert, was that correct?

First of all, it seems you have more than one space before the "{".

Secondly, the documentation says that the variable automatically
become buffer-local when set.  So I suggest to try it interactively
in a buffer, first:

M-x set-variable RET defun-prompt-regexp RET " SPC SPC SPC " RET

Then rescan and see if that helps.  Adjust the number of spaces...
-- 
A preposition is not a good thing to end a sentence with.

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

end of thread, other threads:[~2003-03-12 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-18 23:02 C mode strange coding style kgold
2003-02-20 19:56 ` Kai Großjohann
2003-03-11 20:49   ` kgold
2003-03-12 14:31     ` Kai Großjohann

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