From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: lexical-binding in CC-mode Date: Sat, 10 Apr 2021 19:47:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19354"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sat Apr 10 21:48:05 2021 Return-path: Envelope-to: sf-cc-mode-help@m.gmane-mx.org Original-Received: from lists.sourceforge.net ([216.105.38.7]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVJaP-0004vD-7d for sf-cc-mode-help@m.gmane-mx.org; Sat, 10 Apr 2021 21:48:05 +0200 Original-Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lVJaC-0001xU-07; Sat, 10 Apr 2021 19:47:52 +0000 Original-Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVJa6-0001wx-SI for cc-mode-help@lists.sourceforge.net; Sat, 10 Apr 2021 19:47:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=From:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6ExTLs9YvTakvy55FHNcD8mTf2FN1lKOOHiFbte+Fu0=; b=bsiWOSeOdchB6Eh65PpggtbvI Aer+MEFp54T97cAP5D0x4MuLbvvmBOAs4O/oVWfTekkyeXEIDgSgyBs8EQs44mflw/cNM/X5NozkM V0WZLRHgO4v5LjfKSvRIIBQqyBs2MwPu1eyBEqpmZB+hdQhQbrD20pnU8k1crwzhEpdxk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6ExTLs9YvTakvy55FHNcD8mTf2FN1lKOOHiFbte+Fu0=; b=Wmphb/tpMPsHetO9kWzrlyc+to Y9CLwJOiyrlgOo1Lgvg2xnf5adFlWX8OaBMjC7BBh5iEZtEcSSV12bgsZ3Q90BRuTWEHmK8pMfY83 HXDbLaCx8umN5S6La99ETeTqbsdAnZP0x/TfwTNZwnmwNx7W2vzHBcttuwKf/MnBh3BE=; Original-Received: from eggs.gnu.org ([209.51.188.92]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lVJZz-0007hK-4b for cc-mode-help@lists.sourceforge.net; Sat, 10 Apr 2021 19:47:46 +0000 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49609) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVJZp-0004bf-0H for cc-mode-help@lists.sourceforge.net; Sat, 10 Apr 2021 15:47:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52782) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lVJZo-0006GX-Ih for bug-cc-mode@gnu.org; Sat, 10 Apr 2021 15:47:28 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:13784 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1lVJZl-0004We-1J for bug-cc-mode@gnu.org; Sat, 10 Apr 2021 15:47:28 -0400 Original-Received: (qmail 58440 invoked by uid 3782); 10 Apr 2021 19:47:19 -0000 Original-Received: from acm.muc.de (p4fe15d1d.dip0.t-ipconnect.de [79.225.93.29]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 10 Apr 2021 21:47:19 +0200 Original-Received: (qmail 1829 invoked by uid 1000); 10 Apr 2021 19:47:17 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Headers-End: 1lVJZz-0007hK-4b X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.io gmane.emacs.cc-mode.general:8205 gmane.emacs.devel:267833 Archived-At: Hello, Stefan. On Mon, Apr 05, 2021 at 14:38:08 -0400, Stefan Monnier wrote: > Hi Alan, > We're getting to the last few remaining ELisp files in Emacs still using > the old non-lexical dialect, so I looked at converting CC-mode to use > the new dialect as well. AFAICT the code is basically already prepared > for that, tho I did find some minor things in the patch below. The conversion to lexical-binding is now (?)complete and committed to master. > Of course, the change should be fully backward compatible (i.e. the > code sticks to the common subset of the two dialects). I tried CC Mode (lexical) out with Emacs 24.5, and like you intimated, it seems to have no problems there. > See below the result of my attempt in the form of 4 patches. > 0001 and 0004 are the important ones. 0002 makes the code more regular > (you already use `declare` at various places, so I think it's good to > use it more systematically). 0003 is largely a question of taste (and we > know we don't always agree on that), but I like the warnings it gives me > when a function is marked obsolete or when I make a typo. These two patches, one moving edebug specs to `declare' forms, the other putting #' rather than ' before function names, I haven't done, yet. Creating them must have been quite a bit of work, so thanks! Both of these features are in XEmacs (as I'm sure you've already checked), so there's nothing much holding me back applying them. > As usual, take the parts you like, :-) > Stefan [ .... ] -- Alan Mackenzie (Nuremberg, Germany).