From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic class inheritance Date: Sat, 26 Mar 2016 10:48:06 +0000 Message-ID: <20160326104806.GA3061@acm.fritz.box> References: <1458336813.1207699.553441090.44208CA4@webmail.messagingengine.com> <87wpozbd0r.fsf@acer.localhost.com> <1458372574.1341144.553674538.3D65409A@webmail.messagingengine.com> <1458376039.1351011.553705922.10F4D27F@webmail.messagingengine.com> <20160321122641.GA3641@acm.fritz.box> <1458564356.2685887.555173674.7F6E345D@webmail.messagingengine.com> <20160325185445.GA5003@acm.fritz.box> <1458977160.267408.560116754.57732967@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1458989191 11478 80.91.229.3 (26 Mar 2016 10:46:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Mar 2016 10:46:31 +0000 (UTC) Cc: Ingo Lohmar , 23053@debbugs.gnu.org To: jostein@kjonigsen.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 26 11:46:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ajljQ-000188-UE for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Mar 2016 11:46:13 +0100 Original-Received: from localhost ([::1]:59600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajljP-00004x-DD for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Mar 2016 06:46:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajljL-00004r-2K for bug-gnu-emacs@gnu.org; Sat, 26 Mar 2016 06:46:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajljG-0007Pp-Pn for bug-gnu-emacs@gnu.org; Sat, 26 Mar 2016 06:46:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajljG-0007Pl-Ln; Sat, 26 Mar 2016 06:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ajljG-0008K9-H5; Sat, 26 Mar 2016 06:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 26 Mar 2016 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23053 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 23053-submit@debbugs.gnu.org id=B23053.145898911931937 (code B ref 23053); Sat, 26 Mar 2016 10:46:02 +0000 Original-Received: (at 23053) by debbugs.gnu.org; 26 Mar 2016 10:45:19 +0000 Original-Received: from localhost ([127.0.0.1]:38300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajliZ-0008J2-F2 for submit@debbugs.gnu.org; Sat, 26 Mar 2016 06:45:19 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:15245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajliX-0008Iu-Ih for 23053@debbugs.gnu.org; Sat, 26 Mar 2016 06:45:18 -0400 Original-Received: (qmail 92985 invoked by uid 3782); 26 Mar 2016 10:45:16 -0000 Original-Received: from acm.muc.de (p579E8C8B.dip0.t-ipconnect.de [87.158.140.139]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 26 Mar 2016 11:45:15 +0100 Original-Received: (qmail 3553 invoked by uid 1000); 26 Mar 2016 10:48:06 -0000 Content-Disposition: inline In-Reply-To: <1458977160.267408.560116754.57732967@webmail.messagingengine.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115509 Archived-At: Hello, Jostein. On Sat, Mar 26, 2016 at 08:26:00AM +0100, Jostein Kjønigsen wrote: > On Fri, Mar 25, 2016, at 07:54 PM, Alan Mackenzie wrote: > > Thanks. That was useful, and enabled me to reproduce the problem. It's > > a separate bug from the one Saulius reported with csharp-mode, and occurs > > only in the Emacs master branch. To be precise, a new variable > > introduced in that branch hadn't been given a proper initial value for > > Java (or, indeed, C#), so had the default value nil, which led to the > > error happening. > > This bug has now been fixed and committed to the master branch of the > > Emacs git repository. Would you please get the latest version, and > > confirm that the bug has been satisfactorally fixed. Thanks! > I've tested for both java-mode and csharp-mode. > Once recompiled/reinstalled from melpa/marmalade csharp-mode loads fine > now. Thanks for the fix! Thanks, that's great! [ .... ] > I'll consider this issue fixed at this point, and look into this single > test [ related to fontification ] later. OK. > >> Byte-compiling csharp-mode triggers a warning which so far haven't been > >> an issue for csharp-mode: > > Yes. Somebody in the Emacs team has decided that the second argument, > > previously optional, is now mandatory. I wish people wouldn't do things > > like that. The only thing sensible here is to add a second argument, > > nil, to each call to looking-back. > I've stalled doing this, due to not knowing if I will be changing the > semantics of the code. Do you know if inserting this nil-parameter is > what implicitly done by the compiler in cases such as these? Is such a > change guaranteed "safe"? > If you can confirm that, I can update the code to get rid of simple > issues like this. Adding the nil argument for the new version of `looking-back' is exactly equivalent to leaving it out on the earlier version. Earlier versions of `looking-back' will continue to work unchanged after adding that explicit nil. That argument actually holds a limit position for backward searching. If it is convenient to calculate a sensible limit, this might speed up C# Mode when using `looking-back', since with nil it may be looking arbitrarily far back. > > Can I ask you, as maintainer of csharp-mode: > > (i) To insert "(eval-when-compile (require 'cc-langs))" near the top of > > csharp-mode.el. > > (ii) To add something to the manual telling users to compile > > csharp-mode.el with the Emacs it's going to be run with. > > (i) should help ensure csharp-mode gets properly compiled. (ii) should > > also help ensure csharp-mode is properly compiled. :-) > Consider (i) done. As for (ii) that's usually not done by the user > itself, but by Emacs whenever there's an update to the package on MELPA > or marmalade. OK. > I can add a note to the related bug on the csharp-mode issue-tracker > that this issue is resolved by reinstalling/recompiling the package > though. That would be good. > Cheers! I think it's time to close this bug, which I will do. Thanks for all the help! > -- > Jostein Kjønigsen > jostein@kjonigsen.net / jostein@secure.kjonigsen.net -- Alan Mackenzie (Nuremberg, Germany).