unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs c-mode
@ 2007-04-19 15:23 Hadron
  2007-04-19 16:58 ` Lennart Borgman (gmail)
  2007-04-19 18:13 ` Karl Hegbloom
  0 siblings, 2 replies; 6+ messages in thread
From: Hadron @ 2007-04-19 15:23 UTC (permalink / raw)
  To: help-gnu-emacs


A small bug or something I am missing?

Consider comment (1) below:

/*
 * task_nice - return the nice value of a given task.
 * @p: the task in question.
 */

describe face reveals it as 

font-lock-comment-face

All is highlighted as I would expect based on my customised faces.

However, comment block (2) below (note the second asterisk on line 1):

/**
 * task_nice - return the nice value of a given task.
 * @p: the task in question.
 */

Here the face is

font-lock-doc-face

Is this correct? Is /** supposed to be something special?

c-version is 5.31.3

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

* Re: emacs c-mode
  2007-04-19 15:23 emacs c-mode Hadron
@ 2007-04-19 16:58 ` Lennart Borgman (gmail)
  2007-04-19 18:13 ` Karl Hegbloom
  1 sibling, 0 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-19 16:58 UTC (permalink / raw)
  To: Hadron; +Cc: help-gnu-emacs

Hadron wrote:
> A small bug or something I am missing?
> 
> Consider comment (1) below:
> 
> /*
>  * task_nice - return the nice value of a given task.
>  * @p: the task in question.
>  */
> 
> describe face reveals it as 
> 
> font-lock-comment-face
> 
> All is highlighted as I would expect based on my customised faces.
> 
> However, comment block (2) below (note the second asterisk on line 1):
> 
> /**
>  * task_nice - return the nice value of a given task.
>  * @p: the task in question.
>  */
> 
> Here the face is
> 
> font-lock-doc-face
> 
> Is this correct? Is /** supposed to be something special?

It is special in Java, but I do not think it is so in C/C++.

> c-version is 5.31.3

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

* Re: emacs c-mode
  2007-04-19 15:23 emacs c-mode Hadron
  2007-04-19 16:58 ` Lennart Borgman (gmail)
@ 2007-04-19 18:13 ` Karl Hegbloom
  2007-04-20 10:02   ` Daniel
       [not found]   ` <mailman.2294.1177063692.7795.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 6+ messages in thread
From: Karl Hegbloom @ 2007-04-19 18:13 UTC (permalink / raw)
  To: Hadron; +Cc: help-gnu-emacs

On Thu, 2007-04-19 at 17:23 +0200, Hadron wrote:
> A small bug or something I am missing?
>  [...]
> Is this correct? Is /** supposed to be something special?

Doxygen: http://www.doxygen.org/ ... is in widespread use.  It provides
something very much like Javadoc markup for C and C++ sources.

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

* Re: emacs c-mode
  2007-04-19 18:13 ` Karl Hegbloom
@ 2007-04-20 10:02   ` Daniel
       [not found]   ` <mailman.2294.1177063692.7795.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel @ 2007-04-20 10:02 UTC (permalink / raw)
  To: help-gnu-emacs

Karl Hegbloom wrote:

> On Thu, 2007-04-19 at 17:23 +0200, Hadron wrote:
>> A small bug or something I am missing?
>>  [...]
>> Is this correct? Is /** supposed to be something special?
> 
> Doxygen: http://www.doxygen.org/ ... is in widespread use.  It provides
> something very much like Javadoc markup for C and C++ sources.

There are two variables concerning doc-comments: 
c-doc-comment-style and c-doc-comment-start-regexp.

The first one is a c-style-variable and the buffer-local setting 
of the latter is derived from that, I think.

Do you use any specific c-style, Hadron?

Have fun
----Daniel

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

* Re: emacs c-mode
       [not found]   ` <mailman.2294.1177063692.7795.help-gnu-emacs@gnu.org>
@ 2007-04-20 11:00     ` Hadron
  2007-04-20 11:59       ` Daniel
  0 siblings, 1 reply; 6+ messages in thread
From: Hadron @ 2007-04-20 11:00 UTC (permalink / raw)
  To: help-gnu-emacs

Daniel <daniel@warum-ada.de> writes:

> Karl Hegbloom wrote:
>
>> On Thu, 2007-04-19 at 17:23 +0200, Hadron wrote:
>>> A small bug or something I am missing?
>>>  [...]
>>> Is this correct? Is /** supposed to be something special?
>>
>> Doxygen: http://www.doxygen.org/ ... is in widespread use.  It provides
>> something very much like Javadoc markup for C and C++ sources.
>
> There are two variables concerning doc-comments: c-doc-comment-style
> and c-doc-comment-start-regexp.
>
> The first one is a c-style-variable and the buffer-local setting of
> the latter is derived from that, I think.
>
> Do you use any specific c-style, Hadron?


K&R

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

* Re: emacs c-mode
  2007-04-20 11:00     ` Hadron
@ 2007-04-20 11:59       ` Daniel
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel @ 2007-04-20 11:59 UTC (permalink / raw)
  To: help-gnu-emacs

Hadron wrote:

> Daniel <daniel@warum-ada.de> writes:
> 
>> Karl Hegbloom wrote:
>>
>>> On Thu, 2007-04-19 at 17:23 +0200, Hadron wrote:
>>>> A small bug or something I am missing?
>>>>  [...]
>>>> Is this correct? Is /** supposed to be something special?
>>> Doxygen: http://www.doxygen.org/ ... is in widespread use.  It provides
>>> something very much like Javadoc markup for C and C++ sources.
>> There are two variables concerning doc-comments: c-doc-comment-style
>> and c-doc-comment-start-regexp.
>>
>> The first one is a c-style-variable and the buffer-local setting of
>> the latter is derived from that, I think.
>>
>> Do you use any specific c-style, Hadron?
> 
> 
> K&R

Aah, and you're coding C, not C++, right?  In my GNU Emacs 
22.0.93.1, the default doc-comment style for C is `gtkdoc', which 
also uses `/**' as opener for doc-comment blocks.  Maybe it's 
because your c-doc-comment-style setting is not `set-from-style'?
I don't think it stems from the k&r style.

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

end of thread, other threads:[~2007-04-20 11:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-19 15:23 emacs c-mode Hadron
2007-04-19 16:58 ` Lennart Borgman (gmail)
2007-04-19 18:13 ` Karl Hegbloom
2007-04-20 10:02   ` Daniel
     [not found]   ` <mailman.2294.1177063692.7795.help-gnu-emacs@gnu.org>
2007-04-20 11:00     ` Hadron
2007-04-20 11:59       ` Daniel

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