help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comment confusion


From: Andreas Röhler
Subject: Re: Comment confusion
Date: Tue, 29 Jun 2010 09:08:18 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Hi Aidan,

AFAIS it's in

cc-cmds.el, c-mask-paragraph

Looks like a need for rewriting comment-span-functions

Regards,


Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/


Am 25.06.2010 02:33, schrieb Aidan Gauland:
Hello,

I have been using Emacs and CC-Mode for quite some time now, and I
have just started to play with the D programming language.  I found a
(unofficial) D-mode for Emacs and installed it, but, alas, I ran into
a very annoying bug immediately: it doesn't wrap D-style (/+ +/
instead of /* */) properly.  Now I know that this is not done by
CC-Mode itself, but it does seem to me to do something to allow
fill-paragraph to wrap it relative to the column of stars (for C-style
comments) like so...

/*
  * Normally it is desirable for page boundaries to separate
paragraphs.  The default values of these variables recognize the usual
separator for pages.
  */

M-q

/*
  * Normally it is desirable for page boundaries to separate
  * paragraphs.  The default values of these variables recognize the
  * usual separator for pages.
  */

But in D-mode, D-style comments are not "filled" correctly.

/+
  + Normally it is desirable for page boundaries to separate
paragraphs.  The default values of these variables recognize the usual
separator for pages.
  +/

M-q

/+ + Normally it is desirable for page boundaries to separate
  paragraphs.  The default values of these variables recognize the
  usual separator for pages.
  +/

Or worse...

/+
  + Normally it is desirable for page boundaries to separate
  + paragraphs.  The default values of these variables recognize the
  + usual separator for pages.
  +/

M-q

/+ + Normally it is desirable for page boundaries to separate +
  paragraphs.  The default values of these variables recognize the +
  usual separator for pages.
  +/

I've dug through the Emacs manual, the code for D-mode, and asked for
help on IRC (#emacs on freenode), but to no avail.  I figure this is
the best place to turn to, as my problem is very specific to CC-Mode.
D-mode is based on CC-Mode and seems to treat D-style comments
properly in every other respect.  (I have attached the code for D-mode
as "d-mode.el".)

Thanks,
Aidan Gauland



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]