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

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

bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic


From: Alan Mackenzie
Subject: bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic class inheritance
Date: Sun, 20 Mar 2016 21:16:58 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Saulius.

On Sat, Mar 19, 2016 at 04:15:53PM +0200, Saulius Menkevičius wrote:

> Hi,

> Not sure why I did not receive and email directly from debbugs.gnu.org
> (maybe there is some delay in mail transfer mechanism on the way).

I answered your mail directly, with a copy to debbugs.gnu.org.  But
things can go wrong with email.

> > Thanks for such an informative bug report.  Could you possibly tell me
> > what major mode you're using (presumably some C# Mode) and where I can
> > get a copy of it from, please.  That will enable me to reproduce the
> > problem.

> The mode in question is csharp-mode, from MELPA:

>     csharp-mode is a dependency package.

>         Status: Installed in ‘csharp-mode-20160217.1211/’ (unsigned).
>         Version: 20160217.1211
>         Summary: C# mode derived mode
>     Homepage: https://github.com/josteink/csharp-mode
>     Keywords: c# languages oop mode 
>     Other versions: 20160217.1211 (melpa-stable), 0.8.12 (marmelade).

OK, I've got it, thanks.  In particular, the 0.8.12 version from MELPA.

Next question: have you actually compiled it with the emacs-25 repository
code?  What makes me think you might not have, is that there are lots of

    (looking-back <string>)

instances in the code, which no longer compile.  (They need to have a nil
inserted after <string>, giving (looking-back <string> nil).)  As soon as
I made these edits, then recompiled csharp-mode.el inside the emacs-25
repo version, the code ran just fine.  Actually, I think I had manually
to load cc-langs.elc to get it to compile properly; I think the following
line is missing from near the top of csharp-mode.el:

    (eval-when-compile (require 'cc-langs))

Explanation for the bug I saw: a new "language variable",
c-<>-notable-chars-re, had been defined in CC Mode, but not compiled into
the csharp-mode part.  That left it's value at nil, rather than the
string it should be.  This nil then caused the error.

But it could be I'm looking at totally the wrong problem.

> Not sure if you've checked the tracked for this issue, but Jostein
> Kjønigsen <jostein <at> secure.kjonigsen.net> wrote:

>     I've run this test-case against the "regular" Windows build 24.5.1,
>     using latest csharp-mode package and it runs fine. Trying latest Emacs
>     from git master on Ubuntu I can reproduce this error systematically
>     using the exact same version of csharp-mode.

Exact same source code, or exact same binary?  The source code will need
recompiling for the emacs-25 repo.  csharp-mode.elc compiled for an earlier
version will definitely produce this error on emacs-25.

> So this is can be replicated with bare emacs-25 from git + csharp-mode from
> MELPA. Also someone wrote that the same thing happens with Java mode too
> where the code being edited uses generics (as C# and Java generics syntax is
> very similar).

The same thing happening on Java would surprise me.  That would imply a
different problem.

So, to sum up: please make sure the compiled version of csharp-mode
you're using has been compiled on the Emacs you're using it on.  Thanks!

> > > In GNU Emacs 25.0.92.3 (x86_64-apple-darwin15.3.0, NS appkit-1404.34 
> > > Version 10.11.3 (Build 15D21))
> > >  of 2016-03-17 built on mbp.local
> > > Repository revision: 9ab03f27fad7b1ae68dda7a2effd075658dcf184
> > > Windowing system distributor 'Apple', version 10.3.1404
> > > Configured using:
> > >  'configure --with-gnutls --with-ns'

> > > Configured features:
> > > JPEG DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

> > > Important settings:
> > >   value of $LANG: de_LT
> > >   locale-coding-system: utf-8

> > > Major mode: mu4e-headers

> > ???

> Oh, it was my first time using `report-emacs-bug', -- I invoked
> it from my mail client buffer instead of from the csharp-mode that has
> issue itself.

No, by "???" I just meant "mu4e-headers is something I'm not familiar
with.".

> Thanks!

> -- 
> Saulius Menkevičius (saulius.menkevicius@gmail.com)

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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