Richard Stallman | 1 Mar 2007 09:13
Picon
Picon

[david.hansen <at> gmx.net: Small Documentation Bug]

Is this a doc bug?

------- Start of forwarded message -------
Mail-Followup-To: emacs-pretest-bug <at> gnu.org
To: emacs-pretest-bug <at> gnu.org
From: David Hansen <david.hansen <at> gmx.net>
Date: Wed, 28 Feb 2007 19:11:13 +0100
Organization: disorganized
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Mail-Copies-To: nobody
Subject: Small Documentation Bug
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

Hello,

(info "(autotype)Skeleton Language") says

,----
| [...] or in CC mode's skeletons you find the self-inserting
| elements `{' and `}'.
`----

but there are no such skeletons.

David

_______________________________________________
emacs-pretest-bug mailing list
(Continue reading)

Bill Baxter | 2 Mar 2007 06:02
Picon
Gravatar

Questions for trying to improve D mode!

Howdy, I'm trying to update the Emacs d-mode here for the D
Programming Language:
   http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode
I'd like to support more recent emacs/cc-mode better (while at the
same time not breaking backwards compatibility with previous emacs
releases).

The existing d-mode (above) seems to be in large part copied from a
previous csharp-mode.el that existed out on the net somewhere.  But
that seems to be based on cc-mode before 5.30.

So I have a general question, and that's "how should I upgrade d-mode?"
I found this: http://cc-mode.sourceforge.net/derived-mode-ex.el
example, which is a nice start, but unfortunately it doesn't really
customize all that much behavior, so as a template for making a new
mode, it's kind of limited.  It also doesn't show how to maintain
backward compatibility.

Here's one specific question:

Is cc-mode capable of properly nested comments?  Namely, D has two
block comment syntaxes, /* .. */   and /+ .. +/.   The first acts like
C/C++ in that the comment is terminated on the first appearance of
"*/", but the second nests.  so that e.g.
      /+ ... /+ .. +/  /*  */  +/
is all one big comment.

Thanks,
Bill

(Continue reading)

D. Moonfire | 2 Mar 2007 14:36

Re: Questions for trying to improve D mode!

Bill Baxter wrote:
> Howdy, I'm trying to update the Emacs d-mode here for the D
> Programming Language:
>    http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode
> I'd like to support more recent emacs/cc-mode better (while at the
> same time not breaking backwards compatibility with previous emacs
> releases).
> 
> The existing d-mode (above) seems to be in large part copied from a
> previous csharp-mode.el that existed out on the net somewhere.  But
> that seems to be based on cc-mode before 5.30.

If you are talking about my csharp-mode (http://mfgames.com/linux/csharp-mode),
it was based on derived mode. I don't know about any other csharp-modes, mainly
I stopped paying attention when mine worked 90%. :)

> So I have a general question, and that's "how should I upgrade d-mode?"
> I found this: http://cc-mode.sourceforge.net/derived-mode-ex.el
> example, which is a nice start, but unfortunately it doesn't really
> customize all that much behavior, so as a template for making a new
> mode, it's kind of limited.  It also doesn't show how to maintain
> backward compatibility.

If it isn't based on that, you could probably easily modify it to fit. I have
most of the C# keywords all set in there, along with a couple more interesting ones.

If you have any questions about how or why I did something, feel free to ask.

> Here's one specific question:
> 
(Continue reading)

Andy Schlaikjer | 2 Mar 2007 19:16
Picon
Favicon

javadoc filling and font-lock in c++ mode?

Hello,

I'm interested in using java-style font-locking /and/ filling of comment 
blocks within C++ mode (I use Doxygen with my cpp projects). Is this 
simple to configure? The last time I tried, I was able to get java-style 
font-locking working in other modes, but the filling didn't transfer..

Cheers,
Andy

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Bill Baxter | 3 Mar 2007 13:43
Picon
Gravatar

Re: Questions for trying to improve D mode!

On 3/2/07, D. Moonfire <lists <at> mfgames.com> wrote:

Bill Baxter wrote:
> Here's one specific question:
>
> Is cc-mode capable of properly nested comments?  Namely, D has two
> block comment syntaxes, /* .. */   and /+ .. +/.   The first acts like
> C/C++ in that the comment is terminated on the first appearance of
> "*/", but the second nests.  so that e.g.
>       /+ ... /+ .. +/  /*  */  +/
> is all one big comment.

Sadly, I can't answer that.

The answer seems to be yes, or rather the answer is that emacs is capable of understanding nested syntax, and therefore cc-mode is too.
Here's the magic syntax table modification required to support /+ +/ nested comments:
    (modify-syntax-entry ?+ ". 23n" table)

--bb
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Colin Bernet | 5 Mar 2007 13:51
Picon
Picon

semicolon in .h file. wrong indentation ?

Hello Martin,

I think there is a problem with the identation of .h files in emacs
GNU Emacs 21.4.1 (i686-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) 
of 2007-02-12 on ls20-bc2-14.build.redhat.com

Please try and indent the following code:

class PFAlgo {
 public:

  PFAlgo( const std::set<Element*>& elements) :
    elements_(elements) {}

    // the following function will be wrongly idented.
    // this is due to the presence of the semicolon in the
    // constructor.
    void findBlocks() {}
};

The identation of the same code snippet is ok in
GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) 
of 2005-09-29 on noswad.fnal.gov

cheers,

Colin

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Campbell, James E | 7 Mar 2007 20:47
Picon
Favicon

Cc-mode fontification and imenu

In this example:

namespace
{
  void Foo::foo()
  {
    Bar bar;
    Bar bar();
  }
  void Foo::foofoo()
  {
  }
}

1. In line 6 bar is fontified with font-lock-function-name-face.  Is
this intentional?
2. imenu finds Foo::foo but not Foo::foofoo.

--
Jim Campbell

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Richard Stallman | 8 Mar 2007 22:47
Picon
Picon

[david.hansen <at> gmx.net: Small Documentation Bug]

[I sent this message a week ago but did not get a response.]

Is this a doc bug?

------- Start of forwarded message -------
Mail-Followup-To: emacs-pretest-bug <at> gnu.org
To: emacs-pretest-bug <at> gnu.org
From: David Hansen <david.hansen <at> gmx.net>
Date: Wed, 28 Feb 2007 19:11:13 +0100
Organization: disorganized
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Mail-Copies-To: nobody
Subject: Small Documentation Bug
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

Hello,

(info "(autotype)Skeleton Language") says

,----
| [...] or in CC mode's skeletons you find the self-inserting
| elements `{' and `}'.
`----

but there are no such skeletons.

David

_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Nick Roberts | 9 Mar 2007 05:08
Picon

function is not fontified when return type is not given


The keyword main isn't fontified with K&R syntax (unless it is given a return
type), e.g,

main (argc, argv)
    int argc;
    char **argv;
{
  return;
}

I see that it does fontify correctly with the ANSI syntax:

main (int argc, char** argv) {
{
  return;
}

--

-- 
Nick                                           http://www.inet.net.nz/~nickrob

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Jiri Pejchal | 9 Mar 2007 22:39
Picon

Automatically move cursor after ; when on parenthesis

Hi,

I would like to propose the following for inclusion in cc-mode (or java mode):

Netbeans has a nice feature: when the cursor is on the last
parenthesis of a function call and you press ';', the semicolon is
automatically inserted after the parenthesis. This is useful
because the opening parenthesis usually inserts also the closing
one. In emacs after adding arguments you are left with the
cursor on the closing parenthesis. Then you have to press right and then ';'.

What I would like to achieve:

object.methodCall(a, b|)
                                ^
                                |
                                |
                      cursor here
                      (actually on the parenthesis)

press ';' and get this:

object.methodCall(a, b);|
                                  ^
                                  |
                                  |
                        cursor here
                        (or even on the next line)

Something similar to (with a little help from emacs.help) :

(defun jump-closepar ()
 ""
 (interactive)
 (while (looking-at ")")
               (forward-char))
 (c-electric-semi&comma nil))

It's just a minor thing  but it's convenient and saves a lot of key strokes during the day:-)
(especially if you have '(' bound to skeleton-pair-insert-maybe)
--
Jiri Pejchal
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane