From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#35254: 27.0.50; cc-mode/electric-pair-mode/electric-layout-mode: bad trailing whitespace behavior in cc-mode Date: Sun, 12 May 2019 16:14:41 +0000 Message-ID: <20190512161441.GD20053@ACM> References: <87ftqms9db.fsf@secretsauce.net> <871s15k7ll.fsf@gmail.com> <20190511120524.GA15991@ACM> <87sgtlhyq5.fsf@gmail.com> <20190511161903.GB15991@ACM> <87lfzcwzs4.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="218309"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 35254@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 12 18:15:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPr83-000ugZ-LN for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 May 2019 18:15:11 +0200 Original-Received: from localhost ([127.0.0.1]:44891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPr82-0000D1-In for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 May 2019 12:15:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPr7v-0000Ch-Rh for bug-gnu-emacs@gnu.org; Sun, 12 May 2019 12:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPr7u-0000JW-Tc for bug-gnu-emacs@gnu.org; Sun, 12 May 2019 12:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hPr7u-0000JO-Oz; Sun, 12 May 2019 12:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hPr7u-0005MI-Hx; Sun, 12 May 2019 12:15: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: Sun, 12 May 2019 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35254 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 35254-submit@debbugs.gnu.org id=B35254.155767769220570 (code B ref 35254); Sun, 12 May 2019 16:15:02 +0000 Original-Received: (at 35254) by debbugs.gnu.org; 12 May 2019 16:14:52 +0000 Original-Received: from localhost ([127.0.0.1]:43161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPr7j-0005Lg-MD for submit@debbugs.gnu.org; Sun, 12 May 2019 12:14:51 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:47716 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hPr7i-0005LY-3X for 35254@debbugs.gnu.org; Sun, 12 May 2019 12:14:50 -0400 Original-Received: (qmail 85156 invoked by uid 3782); 12 May 2019 16:14:46 -0000 Original-Received: from acm.muc.de (p2E5D50C3.dip0.t-ipconnect.de [46.93.80.195]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 12 May 2019 18:14:45 +0200 Original-Received: (qmail 20508 invoked by uid 1000); 12 May 2019 16:14:41 -0000 Content-Disposition: inline In-Reply-To: <87lfzcwzs4.fsf@tcd.ie> 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: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:159142 Archived-At: Hello, Basil. On Sat, May 11, 2019 at 20:34:51 +0100, Basil L. Contovounesios wrote: > Alan Mackenzie writes: > > On Sat, May 11, 2019 at 10:06:42 -0400, Noam Postavsky wrote: > >> Alan Mackenzie writes: > >> Of course c-mode could rebind it in its mode map (I considered making > >> `electric-newline-and-maybe-indent' consult `electric-indent-functions' > >> as well but that won't work because that hook is supposed to run after > >> the character is inserted). > > I think we've got enough foggy complexity in the area as it is. I > > suppose CC Mode could bind to `newline-and-indent', but there's now > > no longer a clean function which does what `newline' used to do, to bind > > onto C-j. > Sorry if my question is completely naive or irrelevant (I haven't read > the discussion very carefully), but how does the command > c-context-line-break, which is described under "Making the key > indent the new line" in (info "(ccmode) Getting Started") relate to this > issue, if at all? c-context-line-break doesn't really have much to say in the matter. The function is mainly about how to indent the _new_ line, and inserting various continuation markers. This bug is about trailing space in the _old_ line not getting removed on typing , about which c-context-line-break has nothing to say. > Thanks, No problem! > -- > Basil -- Alan Mackenzie (Nuremberg, Germany).