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 17:30:54 +0100 Organization: Serveur de News Free Message-ID: <50eeecbf$0$2026$426a74cc@news.free.fr> References: <50ee8139$0$2271$426a74cc@news.free.fr> <50ee8d0f$0$21944$426a74cc@news.free.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357835739 30725 80.91.229.3 (10 Jan 2013 16:35:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2013 16:35:39 +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 17:35:57 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 1TtL6h-0003nE-OX for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 17:35:55 +0100 Original-Received: from localhost ([::1]:52859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtL6R-0005QN-Ts for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 11:35:39 -0500 Original-Path: usenet.stanford.edu!goblin3!goblin.stu.neva.ru!news.franciliens.net!gegeweb.org!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!cleanfeed3-b.proxad.net!nnrp1-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: 29 Original-NNTP-Posting-Date: 10 Jan 2013 17:30:55 CET Original-NNTP-Posting-Host: 213.41.244.197 Original-X-Trace: 1357835455 news-3.free.fr 2026 213.41.244.197:49340 Original-X-Complaints-To: abuse@proxad.net Original-Xref: usenet.stanford.edu gnu.emacs.help:196258 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:88559 Archived-At: * Luca Ferrari in gnu.emacs.help: > Anyway, even with your suggestion the feature is not working properly > and I've got still Emacs inserting a new blank line every time. I tested my snippet before posting it and it worked on my side (no blank line when following line is not empty), so this might depend on many other factors (Emacs version, other elisp packages, other .emacs settings...). > Moreover, now the RET does not completes the autocomplete suggestion > but works as a "bare" return. Could it be therefore something that > clashes among autocomplete and auto-state? No idea, and I have to say I can't go further in debugging this, you have to investigate on your side (cc-mode is not too hard to debug with the elisp debugguer and breakpoints on the functions you want to trace, then checking why the line gets inserted or not/removed or not after typing ';'). Check if removing the two "add-to-list" statements in my snippet brings back the autocomplete on RET, then you will now this comes from this part... This is quite basic debugging, so I think you will learn more by doing it by yourself. Maybe if you want to tune more fully your cc-mode you need to define your own style (it is easy to find lots of examples on the Web, for example : http://google-styleguide.googlecode.com/svn/trunk/google-c-style.el). -- DW