help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c-auto-newline question


From: Damien Wyart
Subject: Re: c-auto-newline question
Date: Thu, 10 Jan 2013 17:30:54 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50

* Luca Ferrari <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]