From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Damien Wyart Newsgroups: gmane.emacs.help Subject: Re: c-auto-newline question Date: Thu, 10 Jan 2013 09:52:09 +0100 Organization: Serveur de News Free Message-ID: <50ee8139$0$2271$426a74cc@news.free.fr> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357808112 27644 80.91.229.3 (10 Jan 2013 08:55:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2013 08:55:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 10 09:55:30 2013 Return-path: Envelope-to: geh-help-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 1TtDv8-0003Tg-1H for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 09:55:30 +0100 Original-Received: from localhost ([::1]:58466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtDur-0000Rw-Vz for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 03:55:13 -0500 X-Received: by 10.180.74.74 with SMTP id r10mr1543301wiv.3.1357807930055; Thu, 10 Jan 2013 00:52:10 -0800 (PST) Original-Path: usenet.stanford.edu!m3no13468549wim.1!news-out.google.com!i11ni355435wiw.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp6-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 Original-Lines: 15 Original-NNTP-Posting-Date: 10 Jan 2013 09:52:09 CET Original-NNTP-Posting-Host: 213.41.244.197 Original-X-Trace: 1357807929 news-2.free.fr 2271 213.41.244.197:59568 Original-X-Complaints-To: abuse@proxad.net Original-Xref: usenet.stanford.edu gnu.emacs.help:196245 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88547 Archived-At: * Luca Ferrari in gnu.emacs.help: > I've configured c-auto-newline for my code editing, and it is great > but I'd like to have the newline added when ";" is typed only if the > following line is empty or not-existent yet. In other words, if I'm > editing a line in the middle of the code, I don't want ";" to add an > empty line if the following contains other code. Is this possible? Yes, as explained here http://www.gnu.org/software/emacs/manual/html_mono/ccmode.html#Hanging-Semicolons-and-Commas this is possible. You have to rely on the function c-semi&comma-no-newlines-before-nonblanks. -- DW