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: Luca Ferrari
Subject: Re: c-auto-newline question
Date: Fri, 11 Jan 2013 09:51:04 +0100

At last I got it:
1) I was using add-to-list in a wrong way, and therefore now the
auto-newline works as I want
2) the autocomplete problem with RET is not tied to auto-state but to
the autopair minor mode as reported also here:
http://code.google.com/p/autopair/issues/detail?id=8

So far, I've disabled autopair, since autocomplete is much more
important for my workflow.

Luca

On Thu, Jan 10, 2013 at 5:30 PM, Damien Wyart <damien.wyart@free.fr> wrote:
> * Luca Ferrari <fluca1978@infinito.it> 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]