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.bugs Subject: bug#46301: 28.0.50; cc-mode: add support for c++ lambda expression Date: Mon, 1 Mar 2021 19:34:27 +0000 Message-ID: References: <87czxfx2b9.fsf@gmail.com> <87y2fe2jo3.fsf@gmail.com> <87v9ad4io0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10158"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46301-done@debbugs.gnu.org To: Utkarsh Singh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 01 20:35:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGoK4-0002Tw-Vr for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 20:35:16 +0100 Original-Received: from localhost ([::1]:44576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGoK4-00034c-0F for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 14:35:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGoJr-0002zX-2p for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 14:35:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGoJq-0002Ch-Pu for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 14:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGoJq-0002Xo-Nf for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 14:35:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Mar 2021 19:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46301 X-GNU-PR-Package: emacs Mail-Followup-To: 46301@debbugs.gnu.org, acm@muc.de, utkarsh190601@gmail.com Original-Received: via spool by 46301-done@debbugs.gnu.org id=D46301.16146272779741 (code D ref 46301); Mon, 01 Mar 2021 19:35:02 +0000 Original-Received: (at 46301-done) by debbugs.gnu.org; 1 Mar 2021 19:34:37 +0000 Original-Received: from localhost ([127.0.0.1]:50848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGoJR-0002X1-56 for submit@debbugs.gnu.org; Mon, 01 Mar 2021 14:34:37 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:13171 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lGoJO-0002Wm-Lb for 46301-done@debbugs.gnu.org; Mon, 01 Mar 2021 14:34:35 -0500 Original-Received: (qmail 74117 invoked by uid 3782); 1 Mar 2021 19:34:28 -0000 Original-Received: from acm.muc.de (p4fe15d36.dip0.t-ipconnect.de [79.225.93.54]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 01 Mar 2021 20:34:27 +0100 Original-Received: (qmail 8717 invoked by uid 1000); 1 Mar 2021 19:34:27 -0000 Content-Disposition: inline In-Reply-To: <87v9ad4io0.fsf@gmail.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201147 Archived-At: Hello, Utkarsh. On Sat, Feb 27, 2021 at 21:17:11 +0530, Utkarsh Singh wrote: > Alan Mackenzie writes: > > I've spent the last couple of days fixing the handling of C-M-a/e in > > cc-cmds.el. It took rather more than the four line patch you proposed. > > ;-) Could I ask you, please, to apply the following patch (which should > > apply cleanly to the Emacs master branch), byte compile cc-cmds.el, load > > it into Emacs, and test it for me on your real source code. Then please > > report back whether the bug is in fact fixed, and if not, what is still > > wrong. In the event you would like help with the patching or byte > > compiling, feel free to send me private email. > Thanks now issue is fixed and code itself looks pretty solid. Thanks for doing the testing. I've committed the patch to all the relevant places, and I'm closing the bug with this post. > Due to my in-experience in Elisp and comprehensive cc-mode library I was > unable to deep dive into the patch but I have a questions about it: > Why non-interactive functions of cc-mode doesn't provide doc-string? Quite a lot of functions, even non-interactive ones, and variables have a doc string. This means that those functions/variables are available to modes derived from CC Mode, and their interfaces are fixed. The ones without doc strings are regarded as "internal" to CC Mode, and their interfaces can (and do) change at any time. There's a comment to this effect burried in the first few hundred lines of cc-engine.el. A few years ago, an alternative convention started being adopted by Emacs, where a double hypen is used to indicate an "internal" function or variable. > -- > Utkarsh Singh -- Alan Mackenzie (Nuremberg, Germany).