Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 11 Mar 2025 16:54:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 12:54:31 2025 Received: from localhost ([127.0.0.1]:45303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ts2sB-0004Hq-0x for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 12:54:31 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:45102) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1ts2s7-0004HZ-Nt for 19867 <at> debbugs.gnu.org; Tue, 11 Mar 2025 12:54:28 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5e686d39ba2so1558451a12.2 for <19867 <at> debbugs.gnu.org>; Tue, 11 Mar 2025 09:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741712061; x=1742316861; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=fDTIHtf9xL2kATKWWFcYIZz6clOh2CxuFd8z/1mYNTA=; b=hl22GNQ0FkZ9ydvVc+MzbzdjjW9RUvC44LnjBxDGjMyqNoIGDT4DYlLMoQQFLretZ3 JMiIzkQ2N22hoiMY/IRQKbkji7pQvPakXkoHq3C+rliMMVF37kTDX6TkSsmfvFq4lOIS 57CbNk5rDXgCR+GHc/XUCyH1ygwztwinNeQCKoYR61FW91SAyJjqKJfp0zmBc27nHONk Jyd0TlRLu0/I67aMu+YTGABd5hh6x1qS+mRfNdK/yQeYxu4Wpz7wrrDOALB1p8ix9Bg9 GaFWG7uhhXX5MSyCji2F0jHZB10kGUSAuRs16txWMgKqLXX4nC6LvnE26O1qv7jBXLnV vPJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741712061; x=1742316861; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fDTIHtf9xL2kATKWWFcYIZz6clOh2CxuFd8z/1mYNTA=; b=L+eugGYtxAWg+RpFECODmE1zVtVEOrENObVcH/qef6fnov+iSDSNkjjHKwoppDT7rU e0F9w10QOB+TlIri1WSPzPO80qWuKCgsmgD9sbtH9i6RPQ7+29lU/otGNXc5mwkJHFCu FhyQe0rX5uc3FpwyKT6Z/HKEkXk41W69rLL0f5chWVQsw4FncpvuaaL+G1IOfoz8s4He 8b3KYszgqscmpBdINleGmMwbbASOdSVmR3KwjcPA1b0tZ0OpzA9YRYWv/8jXw0hb2qBC qUltiISxTVBdJG7t8QpN5JyYB3dxnRFrCKOAWJSRx6iX2qSXgQaCqP4dGgsTQUgUoC6g +CiA== X-Forwarded-Encrypted: i=1; AJvYcCXDAwlqTBGJ6mov0L9iZoBCKwzYTsUrWFq4Bpa0REgzB34hJN/8vkSo0iinnXb3Tbl6q+AbYQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwNLLGtWDBsjDQTMGUqQZ83p4H1ltQ8ki1O8sb6QLa23vDmRgJT V8TA7DPjEOvzTEGpIUOSDhMbXSj/rJL0lRyShLidOEdA1vAN9MAezNEUe5hki/cwiSaXez07sre bDOONM9oswlRPlLIqsQv6bREE1qs= X-Gm-Gg: ASbGncvxtVaYV80qqSt21z9I4tDSCFM9QbW3dgncb/4N5q+oniWYzjCx1Oo73Fa545y qfnDtCms8QEoxNKIj/IFel6D6Gbo5r9P6tWmzgJxDASRAmAXi6Yh8KhiW+n6LzQWMjSVewFMJXP H5EKmu78UXPPKf/3c/62Y7OqIlBQ== X-Google-Smtp-Source: AGHT+IHo+WAM5xRmWxV/ZkOtN9eS3pwaaC8LyHdlmlP3lQBq3rJKPtmhWjMoUwOXzWJR/G8BLjLaOGJ+b1DH+IYlngs= X-Received: by 2002:a05:6402:1e93:b0:5e6:1a97:7d09 with SMTP id 4fb4d7f45d1cf-5e75e436164mr5555389a12.16.1741712060840; Tue, 11 Mar 2025 09:54:20 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Mar 2025 09:54:20 -0700 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <CADwFkmmJDuTmrt=APD0ZB8YQzoNY5JqG2ffDq2omA085sXZKRw@HIDDEN> References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> <CADwFkmmJDuTmrt=APD0ZB8YQzoNY5JqG2ffDq2omA085sXZKRw@HIDDEN> MIME-Version: 1.0 Date: Tue, 11 Mar 2025 09:54:20 -0700 X-Gm-Features: AQ5f1JoM1pINw1NJ2EueM42Nd4eNVkD7X4hqdKWanb3BR9VH9tGOAwkq0egivls Message-ID: <CADwFkm=ZjwOMsKFiXqVU9E6h9kH5enyo-j_t=zMaD7r7-e99LQ@HIDDEN> Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists To: Alan Mackenzie <acm@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19867 Cc: Simon <turner25@HIDDEN>, 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Stefan Kangas <stefankangas@HIDDEN> writes: > Simon <turner25@HIDDEN> writes: > >> Initializer lists use curly braces, but their contents do not indent properly with emacs' c++-mode. >> In short, one may use an initializer list to declare and initialize a vector of integers as such: >> std::vector<int> Foo( { 1, 2, 3, 4, 5 } ); >> >> Problems arise when the elements of the list span on multiple line and it gets even worse when the elements are lambda-expressions >> and nested initializer lists. >> The following code illustrate most cases and related situations. The code below compiles without error or warning with gcc 4.8.3. > > I had a look at the fairly long example provided here, and AFAICT, the > indentation is incorrect in the below cases (trimmed down from the > original). Some of the examples of incorrect indentation were already > fixed. > > Alan, could you perhaps take a look at this and see if this is something > that is fixable? Thanks in advance. Alan, any chance you could look into the below cases? Thanks in advance. > #include <vector> > #include <functional> > > namespace emacs_initlist_indentation_bug { > struct DEF { > int d, // > e, // indented from "int" + 2 > f; // > }; > struct GHI { > int // > g, // indented from "int" +0 > h, // indented from "int" + 2 > i; // > }; > > void f4 (int a, int b, int c) > { > std::vector<ABC> abcList2( // Source of > alignment for closing ")" below > {{a+6, > b+6, > c+6} > } // > ); /* Somehow, this > one aligns with first line's comment position!! */ > } > > lambda_initlist_bug.push_back( // > [](int p) // OK, text-book indentation > { // > return p+p; // > } // > ); /* Aligned with > first comment! */ > } > }
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 23 Nov 2020 14:14:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 09:14:54 2020 Received: from localhost ([127.0.0.1]:49589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1khCcH-0001tA-RQ for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 09:14:54 -0500 Received: from mail-ej1-f48.google.com ([209.85.218.48]:35443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1khCcF-0001sw-5A for 19867 <at> debbugs.gnu.org; Mon, 23 Nov 2020 09:14:52 -0500 Received: by mail-ej1-f48.google.com with SMTP id f23so23522774ejk.2 for <19867 <at> debbugs.gnu.org>; Mon, 23 Nov 2020 06:14:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=Jq1YMdOgM7YUrV63nkIIrPrxgmNSeAhHS03iiy8rEGM=; b=bQMmEsLs87vtwyguZzaUmF4SK9x400RVoSpGJ8TKYzamJB2OGaO2dnLVas1iNfaNKU OxeVA+hPDvfVV4CN8wklomPq3WF2vjg3Be/PQxgu/CnnqVBw3+Pn/181PXfo8P2bLOzy 9YcdI/A+9jNEUAQblQLd3Om7RizdqH3uHGfvbZyQz2U/ZrbBI78Pkla5BWLOiDtmzR2d ZQnFPJS2D3cGhFjXDbOF0+2M+5AzbXWsFI3XDejA2DLv2Vawew613C06+E+M/gDTI8gI /dEMK//097wu5lIPym98mCyckFrb6v7Ae2za9kx+KnRV8RxFR0wuZKqLRBtdinCVpKAu vhTA== X-Gm-Message-State: AOAM533hUEEQl9bGAf4fMxQOZ3JMl/x71zl0mmNByaCCK/j8UVQtVeU1 Wu+xvGeZmPv0NTqPlGoZG7VgdAmFNaUShh72F/k= X-Google-Smtp-Source: ABdhPJxfW6n4KPdEdDw56h6xMYhxRh6ys7+62H0E6HwfvUQcOiBGa2q0riUeHTnJIMs36I+g7C388x48wopFhnoAbfA= X-Received: by 2002:a17:906:614a:: with SMTP id p10mr25880210ejl.312.1606140885400; Mon, 23 Nov 2020 06:14:45 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 23 Nov 2020 09:14:43 -0500 From: Stefan Kangas <stefan@HIDDEN> In-Reply-To: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> (Simon's message of "Sat, 14 Feb 2015 12:50:31 -0500") References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Mon, 23 Nov 2020 09:14:43 -0500 Message-ID: <CADwFkmmJDuTmrt=APD0ZB8YQzoNY5JqG2ffDq2omA085sXZKRw@HIDDEN> Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists To: Alan Mackenzie <acm@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 19867 Cc: Simon <turner25@HIDDEN>, 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.5 (/) Simon <turner25@HIDDEN> writes: > Initializer lists use curly braces, but their contents do not indent properly with emacs' c++-mode. > In short, one may use an initializer list to declare and initialize a vector of integers as such: > std::vector<int> Foo( { 1, 2, 3, 4, 5 } ); > > Problems arise when the elements of the list span on multiple line and it gets even worse when the elements are lambda-expressions > and nested initializer lists. > The following code illustrate most cases and related situations. The code below compiles without error or warning with gcc 4.8.3. I had a look at the fairly long example provided here, and AFAICT, the indentation is incorrect in the below cases (trimmed down from the original). Some of the examples of incorrect indentation were already fixed. Alan, could you perhaps take a look at this and see if this is something that is fixable? Thanks in advance. #include <vector> #include <functional> namespace emacs_initlist_indentation_bug { struct DEF { int d, // e, // indented from "int" + 2 f; // }; struct GHI { int // g, // indented from "int" +0 h, // indented from "int" + 2 i; // }; void f4 (int a, int b, int c) { std::vector<ABC> abcList2( // Source of alignment for closing ")" below {{a+6, b+6, c+6} } // ); /* Somehow, this one aligns with first line's comment position!! */ } lambda_initlist_bug.push_back( // [](int p) // OK, text-book indentation { // return p+p; // } // ); /* Aligned with first comment! */ } }
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 17 Feb 2015 19:39:18 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 17 14:39:18 2015 Received: from localhost ([127.0.0.1]:46633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YNnzJ-0004vR-PD for submit <at> debbugs.gnu.org; Tue, 17 Feb 2015 14:39:18 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:34628) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <turner25@HIDDEN>) id 1YNnzH-0004vB-AB for 19867 <at> debbugs.gnu.org; Tue, 17 Feb 2015 14:39:15 -0500 Received: by pdjg10 with SMTP id g10so45990362pdj.1 for <19867 <at> debbugs.gnu.org>; Tue, 17 Feb 2015 11:39:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=8d/R3ZxrKv2Fb6N3mvqMaoM3BmsfrrNCkgTSykUh1Vo=; b=idGio6dAMSoL0YW3bW+as6Elivq0g51BdzoNUcbjXA9kw7x5bMk1rXyku26y2b0klt mw+03PPnI+xq7U/mr8d9NtHZ3t+mq0o8R6BjqNxedTTjbNtfBrRzTfyz2Wy13bHYSauX ay7SJPRdd73uuZl9AlyqfUrrqaZ8UknAPvzVatO2e1rpXkab7V3FrZUUN4qMQXmcfx55 hR7ewIADa3fOWq6Qj6bGKTQ6U/CuQZDhnpaJr2MMt6Q9uCag3Mw+YtSVGhnXGjOWMoKW fD54m4KfxG2eT+nifw1zNRCmn07KbRiwJDvjzZ/ikRswkObRij2q+Wu2WF2PLxQrglsc HvDw== MIME-Version: 1.0 X-Received: by 10.68.200.97 with SMTP id jr1mr51266585pbc.123.1424201949251; Tue, 17 Feb 2015 11:39:09 -0800 (PST) Received: by 10.70.112.195 with HTTP; Tue, 17 Feb 2015 11:39:09 -0800 (PST) In-Reply-To: <v5lhjw2vgn.fsf@HIDDEN> References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> <bd7fvhad18.fsf@HIDDEN> <CAN1q39WMLXU56_J6DiOsqzhmsi0TSOLOqzJqKEKPbynzSuzTLA@HIDDEN> <v5lhjw2vgn.fsf@HIDDEN> Date: Tue, 17 Feb 2015 14:39:09 -0500 Message-ID: <CAN1q39WLUW5G-OKDat6mU+JEb7VOzCbOBMhzs6X0aTtP9TArfg@HIDDEN> Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists From: Simon <turner25@HIDDEN> To: Glenn Morris <rgm@HIDDEN> Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 19867 Cc: 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: turner25@HIDDEN List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.4 (/) > In Emacs, we traditionally reserve severity > normal for failure to > build, security issues etc. So I'll downgrade this to normal, but don't > worry, because I have seen very little evidence that the severity makes > any difference to whether something gets fixed. :), and :( too. Sounds good. Thank you Glenn. I hope someone can look into this within a year or two. Ideally, before C++17 becomes a reality and swizzles the syntax further with its "concepts lite" and other features. I also noticed some more strange indentation cases with nested constructor initialization lists. I'll be available to test any improvements made and provide more test cases if needed. Thanks again.
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Glenn Morris <rgm@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 17 Feb 2015 19:23:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 17 14:23:39 2015 Received: from localhost ([127.0.0.1]:46601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YNnkA-00035q-Lu for submit <at> debbugs.gnu.org; Tue, 17 Feb 2015 14:23:38 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:43733 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <rgm@HIDDEN>) id 1YNnk8-00035i-Vp for 19867 <at> debbugs.gnu.org; Tue, 17 Feb 2015 14:23:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1YNnk8-0007br-5E; Tue, 17 Feb 2015 14:23:36 -0500 From: Glenn Morris <rgm@HIDDEN> To: turner25@HIDDEN Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> <bd7fvhad18.fsf@HIDDEN> <CAN1q39WMLXU56_J6DiOsqzhmsi0TSOLOqzJqKEKPbynzSuzTLA@HIDDEN> X-Spook: Europol Manfurov AFSPC STARLAN CID investigation AVN X-Ran: h3--|sZ>g~b.b^]rPhKdtaOmtr1HlUhrMuQB5u%ySRnW#)U$WzTOBM+B7Bob'\f^YHww>b X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 17 Feb 2015 14:23:36 -0500 In-Reply-To: <CAN1q39WMLXU56_J6DiOsqzhmsi0TSOLOqzJqKEKPbynzSuzTLA@HIDDEN> (Simon's message of "Mon, 16 Feb 2015 14:29:36 -0500") Message-ID: <v5lhjw2vgn.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19867 Cc: 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) In Emacs, we traditionally reserve severity > normal for failure to build, security issues etc. So I'll downgrade this to normal, but don't worry, because I have seen very little evidence that the severity makes any difference to whether something gets fixed. :), and :( too.
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 16 Feb 2015 21:38:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 16 16:38:50 2015 Received: from localhost ([127.0.0.1]:45669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YNTNS-0000kw-0s for submit <at> debbugs.gnu.org; Mon, 16 Feb 2015 16:38:50 -0500 Received: from dancol.org ([96.126.100.184]:38660) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <dancol@HIDDEN>) id 1YNTNK-0000kE-GX for 19867 <at> debbugs.gnu.org; Mon, 16 Feb 2015 16:38:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=MFu0adCEibR1woydY4dyuXJgrY1OpONk3ZlPDelNA5Y=; b=g4lfuSC0EL3MLkMrUx7EmKiPWbQYOhAvlp76Gpwy5WZWa6WuvmKqzsccZ4RD2NZ064jiSVuT2P2y17t/4b7JJZd4Oe1LeJ4XTGvR0uY04AjSUDt455A0PVLqH3qugOppRpQwF2nGqQNoBO1CfsdbnVYG5ObCoRa68zuZv7X17D5+VMylIf3Mzip3N+VCDvvez91f2gsRcBMDe9g/h4Dlux5jUTIN3hK1kO5DG6I0EE3Tuq7YbECtBu8iua44b8plZAg12P4svQzS19V8esykExdAFgiulU8b8b9MbL9Iw2T997qEZ2rZZK17U7fpSuuWu6fFbRVaAZibPexs8HtgMQ==; Received: from c-73-221-38-18.hsd1.wa.comcast.net ([73.221.38.18] helo=[192.168.1.174]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from <dancol@HIDDEN>) id 1YNTNI-0000zv-Qp; Mon, 16 Feb 2015 13:38:40 -0800 Message-ID: <54E2635F.2040104@HIDDEN> Date: Mon, 16 Feb 2015 13:38:39 -0800 From: Daniel Colascione <dancol@HIDDEN> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: turner25@HIDDEN, Glenn Morris <rgm@HIDDEN> Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> <bd7fvhad18.fsf@HIDDEN> <CAN1q39WMLXU56_J6DiOsqzhmsi0TSOLOqzJqKEKPbynzSuzTLA@HIDDEN> In-Reply-To: <CAN1q39WMLXU56_J6DiOsqzhmsi0TSOLOqzJqKEKPbynzSuzTLA@HIDDEN> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hhvWpPKuU23QBSrxXt6abARFKBxEMTPUS" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 19867 Cc: 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hhvWpPKuU23QBSrxXt6abARFKBxEMTPUS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/16/2015 11:29 AM, Simon wrote: > On Mon, Feb 16, 2015 at 2:09 PM, Glenn Morris <rgm@HIDDEN> wrote: >> Simon wrote: >> >>> Severity: important >> >> Unless it leads to invalid code (eg Python-style languages), I tend to= >> think of indentation bugs as minor problems, since it's just cosmetic.= >> Why do you think this one is important? >=20 > I am inclined to follow your lead. C++ code compiles without errors > as I mentioned. >=20 > The bug affects "c++-mode" and since c++-mode mostly (solely?) affects > cosmetics, then the bug makes c++-mode difficult to use. In fact, I > have been searching for alternatives, in vain. >=20 > I would suggest keeping severity as "important" if this report can be > assigned more precisely to the "c++-mode" sub-package or group. If > not, then you may downgrade to "minor" as you said. OP, your best bet is to dive into cc-engine.el and fix it yourself. --hhvWpPKuU23QBSrxXt6abARFKBxEMTPUS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJU4mNfAAoJEN4WImmbpWBlkLYP/0giyVJ3Ya6WDY62j7hl13/Y iwY9flrVNtggE7MFuuwkvq1aOgxfblrPP5OswBse8XeHxuR8pcpaFwqpcQfH6vF0 gWzTBeeGGGmzyWdr4WI7ecBpFiNK9gV7PN+R6qGUMvXkWrmqcY2RZxD++aDv8Qrb hpmBusbY1V0eYQ9zyNTPOVqfhRbOAwbqHbTVDAjHHsPTMV7votzvpjL7lGaESNx7 sMJcBcQsgfxL20CWvRl06A8e7U+W8qCEfAu2KKANx/LeuPEdfDhakdvi2AVAQlhQ 3+T0h3XsLNxLyy/doA2OwWupsutZ2Rcn4RmmDpfSdZP7jLd1XWzQOC+grhv2NESi XpAfosWnJVkZzGdBNgeeO9EeCecyhLqiX8omzRZVqEsvq6hglVXZ/rd8IQM70Rl9 Aa3N+xkIgSR5+7PL0MU6YIJFXU1TqM57aqn4oQw5L7l4+yC6fNGW5goQP7Swuv00 TjH3ynfR0UKjegkMFgUVel6xxWwBv25NbDx532CeKUdQfFAwSWpEEpCBh6Un9tLJ 1Jm39vX7d1sXpgsL3j93I3TB9kIYMfLF/gMVKREwa3b1Ix/m5rscddkExwLqnncm 7uP5zDdq6Ve1mrujK0j/9TrpKh9eyfi078XNa/C/7h1DrcyGsmNfTMeBGA58inFb bDVqY8eR07G6BgnpHGnB =1c9P -----END PGP SIGNATURE----- --hhvWpPKuU23QBSrxXt6abARFKBxEMTPUS--
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 16 Feb 2015 21:03:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 16 16:03:14 2015 Received: from localhost ([127.0.0.1]:45654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YNSp0-0006Sc-5G for submit <at> debbugs.gnu.org; Mon, 16 Feb 2015 16:03:14 -0500 Received: from dancol.org ([96.126.100.184]:38507) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <dancol@HIDDEN>) id 1YNSoy-0006SM-IV for 19867 <at> debbugs.gnu.org; Mon, 16 Feb 2015 16:03:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=VsqrXNr+fW7qyMmnlVdIAHhplw6mq6eT/ihXlHm1dnk=; b=UhTFrO4QgffozoBV9VCREeSE7htO1koYsFTYuyXMEu8qUpTT4ySIfBvpsx8Bxbe3G2m7CWRcEFiCK9vGr7/uWTyyqo0tjh0t9OhjhJz9nOvSHN6SD3UTGtlEvAhw3ma9GPZZ8GdYPnvpwBZAUnX5jywCwJyMtM5z5HfgCESlKtYR66Vxe/PxGCjtokiSKUm5mvDTUju45R7SUKWumzYGOJUPpZJEEFnX4k0qbsJTnVlm0D5YYDD2YSHLFzIKDD8pA+DGj+3Zxk4l65bJIF6qcAW7NXUR+cSfHVUM0AY75wXdl259nGhEeIVRcaaHtY4efxrf+n/ZhFSSGpHSu8VQIA==; Received: from c-73-221-38-18.hsd1.wa.comcast.net ([73.221.38.18] helo=[192.168.1.174]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from <dancol@HIDDEN>) id 1YNSow-0000oT-HC; Mon, 16 Feb 2015 13:03:10 -0800 Message-ID: <54E25B0C.101@HIDDEN> Date: Mon, 16 Feb 2015 13:03:08 -0800 From: Daniel Colascione <dancol@HIDDEN> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Glenn Morris <rgm@HIDDEN>, turner25@HIDDEN Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> <bd7fvhad18.fsf@HIDDEN> In-Reply-To: <bd7fvhad18.fsf@HIDDEN> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tijJraQmrcefgi29bcJ4EmfLPI3fnu5c4" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 19867 Cc: 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tijJraQmrcefgi29bcJ4EmfLPI3fnu5c4 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02/16/2015 11:09 AM, Glenn Morris wrote: > Simon wrote: >=20 >> Severity: important >=20 > Unless it leads to invalid code (eg Python-style languages), I tend to > think of indentation bugs as minor problems, since it's just cosmetic. > Why do you think this one is important? Indentation bugs are infuriating because I use electric mode, which means that even if I fix the indentation, the fixes are undone automatically. --tijJraQmrcefgi29bcJ4EmfLPI3fnu5c4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJU4lsMAAoJEN4WImmbpWBlphUQAIKh2r7KQEt2EMjmVQ9wP7NK i8OKnbA7lK7RhfQHRg/QLf2Cg/PwYRsUx61nsRHvLW30Xqvszq/rN8DLEYw7oJSI HEIIqfP13GHLi22z1y76NX78CIiVDAan7KE8JqbIqnglFIZvTmB0dnqDQOmXR567 4kp4yk+ymU7oydlbl14/C7pAXmm+BuZGnBo9nNnAX8qPis7KwRuOscTZKwT+0GM8 IMZUEMTR/Nbh8jVM6c5gInIQrS//1qr3Q43lPSewBsdxd0Bte0JMm0YWe3McYJ4B R/llZG6XCkWavS4OTPohhgn1AGX4B1S08d7CH1Gz1pIpF6b8WKW5Hq1yAaCBtmMw 9W7vciRr1EZCSiPApRahyBe4mdwnMLtr4zuFJi9zkObMBowa7HmilvPSBTSXORSq vXIUVLw+FyVolkuag2vXuxzQ/wtDrrPghKclscvX5V28d2FU6k2/Ggjw70UhoizG DfAGb3syPfReM1+10EOTn6388+3/pDBUpxXssKUIAjZeQWQn0Vphfk+4vl0p/0+e PMS1h9PyhvDRFcDdt/9dtwzh4dJvzauWYJsjHqca55DpIw9lUjGpkIt0azsSKH1U M6S32o5wecVNr4lxpDbLnsr9Rw9n86awYv5xLlzvKadiXmwMm3ZKFGZFveX7Umzp CUDSaoqSZozExb3iLeSf =JcmB -----END PGP SIGNATURE----- --tijJraQmrcefgi29bcJ4EmfLPI3fnu5c4--
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 16 Feb 2015 19:29:45 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 16 14:29:45 2015 Received: from localhost ([127.0.0.1]:45620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YNRMW-0001fC-PL for submit <at> debbugs.gnu.org; Mon, 16 Feb 2015 14:29:45 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:45943) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <turner25@HIDDEN>) id 1YNRMU-0001ez-Bu for 19867 <at> debbugs.gnu.org; Mon, 16 Feb 2015 14:29:44 -0500 Received: by pablf10 with SMTP id lf10so510251pab.12 for <19867 <at> debbugs.gnu.org>; Mon, 16 Feb 2015 11:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=IX66xTfnqQMr2BGCSxIlI5/CcCfquzaHeq4rOAC8upo=; b=ZGDvwGcilsNSXYeQNmtWGWcwRBi3T+bd/QzPVA+Q0Belk6KIsnU+My5P/PNTLy5ONM 5zP3IgmlyKm1r3UXzac35k39AUn28HIJXheDcqVsPJ7S8+fgt5SoyTn1W7GsXAMuv3wD FvhFqzHLcQ1z6KkST7ksbzo/oOfUOuf4ouKLGsnZ6rMUk7SS1fM3TuFcIvXcoZhMZpzi Q3OPM3HZydNvdckm8W7m05xrj/JgfNV/pjl6H162SzR7LvOpe14kUoVkxqKOD2Lz+jJC 1L7Lum7TMGzwNld/9+Lov9qDyYU1wqOL39jbiahBHXjj9Crg+FGvXmDV/9nLFRgri/SE yxdg== MIME-Version: 1.0 X-Received: by 10.70.34.177 with SMTP id a17mr42308859pdj.123.1424114976522; Mon, 16 Feb 2015 11:29:36 -0800 (PST) Received: by 10.70.112.195 with HTTP; Mon, 16 Feb 2015 11:29:36 -0800 (PST) In-Reply-To: <bd7fvhad18.fsf@HIDDEN> References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> <bd7fvhad18.fsf@HIDDEN> Date: Mon, 16 Feb 2015 14:29:36 -0500 Message-ID: <CAN1q39WMLXU56_J6DiOsqzhmsi0TSOLOqzJqKEKPbynzSuzTLA@HIDDEN> Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists From: Simon <turner25@HIDDEN> To: Glenn Morris <rgm@HIDDEN> Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 19867 Cc: 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: turner25@HIDDEN List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.4 (/) On Mon, Feb 16, 2015 at 2:09 PM, Glenn Morris <rgm@HIDDEN> wrote: > Simon wrote: > >> Severity: important > > Unless it leads to invalid code (eg Python-style languages), I tend to > think of indentation bugs as minor problems, since it's just cosmetic. > Why do you think this one is important? I am inclined to follow your lead. C++ code compiles without errors as I mentioned. The bug affects "c++-mode" and since c++-mode mostly (solely?) affects cosmetics, then the bug makes c++-mode difficult to use. In fact, I have been searching for alternatives, in vain. I would suggest keeping severity as "important" if this report can be assigned more precisely to the "c++-mode" sub-package or group. If not, then you may downgrade to "minor" as you said.
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at 19867) by debbugs.gnu.org; 16 Feb 2015 19:09:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 16 14:09:59 2015 Received: from localhost ([127.0.0.1]:45591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YNR3O-0008Dh-Ua for submit <at> debbugs.gnu.org; Mon, 16 Feb 2015 14:09:59 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:48202 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <rgm@HIDDEN>) id 1YNR3N-0008Da-6N for 19867 <at> debbugs.gnu.org; Mon, 16 Feb 2015 14:09:57 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1YNR3L-0006zt-Pl; Mon, 16 Feb 2015 14:09:55 -0500 From: Glenn Morris <rgm@HIDDEN> To: turner25@HIDDEN Subject: Re: bug#19867: c++-mode indentation issues with C++1x initializer lists References: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> X-Spook: anarchy David John Oates Cohiba investigation Telex Area X-Ran: KPv)Le^weyUJho)xki.:|UWH|va5ko{I4J%zd^}ZKOsWgS2L0gZ83\}.iVA=Vlm004Z+B~ X-Hue: black X-Attribution: GM Date: Mon, 16 Feb 2015 14:09:55 -0500 In-Reply-To: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> (Simon's message of "Sat, 14 Feb 2015 12:50:31 -0500") Message-ID: <bd7fvhad18.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19867 Cc: 19867 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) Simon wrote: > Severity: important Unless it leads to invalid code (eg Python-style languages), I tend to think of indentation bugs as minor problems, since it's just cosmetic. Why do you think this one is important?
bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN
:bug#19867
; Package emacs,cc-mode
.
Full text available.Received: (at submit) by debbugs.gnu.org; 14 Feb 2015 18:16:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 14 13:16:36 2015 Received: from localhost ([127.0.0.1]:44128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1YMhGd-0005iT-FR for submit <at> debbugs.gnu.org; Sat, 14 Feb 2015 13:16:36 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:38868) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <turner25@HIDDEN>) id 1YMgrV-00057B-7w for submit <at> debbugs.gnu.org; Sat, 14 Feb 2015 12:50:38 -0500 Received: by pdbfp1 with SMTP id fp1so21716002pdb.5 for <submit <at> debbugs.gnu.org>; Sat, 14 Feb 2015 09:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=U6KJg7bMGE5psLP4fmFFgrilFisMYrb3V5KrGL1vE6E=; b=dixcabT3ungkWGJmnmfwd8WvFc1mqISUfA/pEnIn06B93MWAjlXquNGaUh1ExACAVx UdvlXQO8lg9Bx33fVtQc74aG/lk/pU2hEdqQavT09XrqhvjNFBJJnmZhKBn2T/CqF8fm Q//J9g7bOA3VF73MRnBfXP1DEX83WPvhrJxS1kRpfuvzxDb0kKILNYmF6oVA/8u4B/7W TsVMYsL29BaOGYsE84umJPs8nQEvuGAanS1yE0wCC2+uFzctlVSx2TzMMsNH8WbcYpkY 74VsotNNKm3/GuDJX3ZUwlYgNU03JF0fCcnHBpcLMyHQ5TP6BGceGl0Xn7PqH74Un0s6 JLbg== MIME-Version: 1.0 X-Received: by 10.68.200.97 with SMTP id jr1mr25029773pbc.123.1423936231359; Sat, 14 Feb 2015 09:50:31 -0800 (PST) Received: by 10.70.112.195 with HTTP; Sat, 14 Feb 2015 09:50:31 -0800 (PST) Date: Sat, 14 Feb 2015 12:50:31 -0500 Message-ID: <CAN1q39UD+_g9VQNCHKanbQvWt9mVWSHJQjZxsMC=VJ7JGG5wPQ@HIDDEN> Subject: c++-mode indentation issues with C++1x initializer lists From: Simon <turner25@HIDDEN> To: submit <at> debbugs.gnu.org Content-Type: multipart/alternative; boundary=047d7b10cef340cb22050f0ffd4c X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 14 Feb 2015 13:16:33 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: turner25@HIDDEN List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.4 (/) --047d7b10cef340cb22050f0ffd4c Content-Type: text/plain; charset=UTF-8 Package: emacs Version: 24.4.1 Severity: important Related: c++-mode Initializer lists use curly braces, but their contents do not indent properly with emacs' c++-mode. In short, one may use an initializer list to declare and initialize a vector of integers as such: std::vector<int> Foo( { 1, 2, 3, 4, 5 } ); Problems arise when the elements of the list span on multiple line and it gets even worse when the elements are lambda-expressions and nested initializer lists. The following code illustrate most cases and related situations. The code below compiles without error or warning with gcc 4.8.3. In case email systems mess with the spaces, the code below is available at this URL as well: http://next.n32.ca/emacs_initlist_indentation_bug.txt #include <vector> #include <functional> namespace emacs_initlist_indentation_bug { struct ABC { int a; // OK, text-book indentation int b; // int c; // }; struct DEF { int d, // e, // indented from "int" + 2 f; // }; struct GHI { int // g, // indented from "int" +0 h, // indented from "int" + 2 i; // }; int f1 ( int a, // Indentation OK in function declaration context int b, // int c // ) // Notice how the ")" is indented { if(a>0){ return a+ // while out-of-topic, this probably pinpoints b+ // what's going on internally c; // } else if(a<0) { return (a+ // these are well aligned b+ // c); // } else { return (a+ // these are well aligned b+ // c); // } } void f2 (const ABC& abc) { f1(abc.a, // Indentation OK in function call context abc.b, // abc.c); // } void f3 (int a, int b, int c) { f1( f1( a+1, // Indentation OK, text-book example, perfect! b+1, // c+1 ), // f1( a+2, // b+2, // c+2 ), // f1( a+3, // b+3, // c+3 ) // ); // } void f4 (int a, int b, int c) { f2({a+1, // note "{" on same line as "(" b+1, // indented after "{" + 2 c+1} // ); // Bad! ")" indented underneath "(" instead of argument (ie. "{") f2( {a+2, // note "{" on different line as "(" b+2, // indented after "{" + 3 !!! c+2} // ); // OK, ")" indented underneath "{" // Below are some typical indentation I'm getting these days. // The only difference is in the newline on first line (and numerics) std::vector<ABC> abcList1({{a+1, // b+1, // c+1}, // {a+2, // b+2, // c+2}, // {a+3, // b+3, // c+3} // } // ); // std::vector<ABC> abcList2( // Source of alignment for closing ")" below {{a+4, // b+4, // c+4}, // {a+5, // b+5, // c+5}, // {a+6, // b+6, // c+6} // } // ); /* Somehow, this one aligns with first line's comment position!! */ } void f5 () { int foo = 0; std::vector< std::function<int(int)> > lambda_initlist_bug({ // [foo](int x) // { // BAD, too indented by 2 positions return x+x; // }, // [foo](int y) // { // BAD, too indented by 2 positions return y+y; // }, // [foo](int z) // { // BAD, too indented by 2 positions return z+z; // } // } ); lambda_initlist_bug.push_back( // [](int p) // OK, text-book indentation { // return p+p; // } // ); /* Aligned with first comment! */ for(auto f_lambda : lambda_initlist_bug){ f_lambda( 123 ); } } } --047d7b10cef340cb22050f0ffd4c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Package: emacs<div>Version: 24.4.1<br></div><div>Severity:= important</div><div><br></div><div>Related: c++-mode</div><div><br></div><= div><br></div><div>Initializer lists use curly braces, but their contents d= o not indent properly with emacs' c++-mode.</div><div>In short, one may= use an initializer list to declare and initialize a vector of integers as = such:</div><div>=C2=A0 std::vector<int> Foo( { 1, 2, 3, 4, 5 } );</di= v><div><br></div><div>Problems arise when the elements of the list span on = multiple line and it gets even worse when the elements are lambda-expressio= ns and nested initializer lists.</div><div>The following code illustrate mo= st cases and related situations.=C2=A0 The code below compiles without erro= r or warning with gcc 4.8.3.</div><div><br></div><div><br></div><div>In cas= e email systems mess with the spaces, the code below is available at this U= RL as well:</div><div><a href=3D"http://next.n32.ca/emacs_initlist_indentat= ion_bug.txt">http://next.n32.ca/emacs_initlist_indentation_bug.txt</a><br><= /div><div><br></div><div><div><pre style=3D"color:rgb(0,0,0);word-wrap:brea= k-word;white-space:pre-wrap">#include <vector> #include <functional> namespace emacs_initlist_indentation_bug { struct ABC { int a; // OK, text-book indentation int b; // int c; // }; struct DEF { int d, // e, // indented from "int" + 2 f; // }; struct GHI { int // g, // indented from "int" +0 h, // indented from "int" + 2 i; // }; int f1 ( int a, // Indentation OK in function declaration context int b, // int c // ) // Notice how the ")" is indented { if(a>0){ return a+ // while out-of-topic, this probably pinpoints b+ // what's going on internally=20 c; // } else if(a<0) { return (a+ // these are well aligned b+ // c); // } else { return=20 (a+ // these are well aligned b+ // c); // } =20 } void f2 (const ABC& abc) { f1(abc.a, // Indentation OK in function call context abc.b, // abc.c); // } void f3 (int a, int b, int c) { f1( f1( a+1, // Indentation OK, text-book example, perfect! b+1, // c+1 ), // f1( a+2, // b+2, // c+2 ), // f1( a+3, // b+3, // c+3 ) // ); // } void f4 (int a, int b, int c) { f2({a+1, // note "{" on same line as "(" b+1, // indented after "{" + 2 c+1} //=20 ); // Bad! ")" indented underneath "(" in= stead of argument (ie. "{") =20 f2( {a+2, // note "{" on different line as "(" b+2, // indented after "{" + 3 !!! c+2} // ); // OK, ")" indented underneath "{" =20 // Below are some typical indentation I'm getting these days. // The only difference is in the newline on first line (and numerics) =20 std::vector<ABC> abcList1({{a+1, // b+1, // c+1}, // {a+2, // b+2, // c+2}, // {a+3, // b+3, // c+3} // } // ); // =20 std::vector<ABC> abcList2( // Source of align= ment for closing ")" below {{a+4, // b+4, // c+4}, // {a+5, // b+5, // c+5}, // {a+6, // b+6, // c+6} // } // ); /* Somehow, this one aligns with first line's comment posit= ion!! */ =20 } =20 void f5 () { int foo =3D 0; std::vector< std::function<int(int)> > lambda_initlist_bug({ // [foo](int x) // { // BAD, too indented by 2 positions return x+x; // }, // [foo](int y) // { // BAD, too indented by 2 positions return y+y; // }, // [foo](int z) // { // BAD, too indented by 2 positions return z+z; // } // } ); =20 lambda_initlist_bug.push_back( // [](int p) // OK, text-book indentation { // return p+p; // } // ); /* Aligned with first comment! */ =20 for(auto f_lambda : lambda_initlist_bug){ f_lambda( 123 ); } =20 } }</pre><pre style=3D"color:rgb(0,0,0);word-wrap:break-word;white-space:pre-= wrap"><br></pre></div></div></div> --047d7b10cef340cb22050f0ffd4c--
turner25@HIDDEN
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#19867
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.