[Top][All Lists]

[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 10:42:39 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50

* Luca Ferrari <> in
> that is what I was looking for, but I suspect I'm doing something
> wrong since it is not working. In my .emacs file I've got:
> (add-hook 'c-mode-common-hook
>           '(lambda ()
>              (c-set-style "java")
>              (setq c-auto-newline t)
>              (setq c-hungry-delete-key t)
>     (c-hanging-semi&comma-criteria
>      . (c-semi&comma-no-newlines-before-nonblanks
>         c-semi&comma-no-newlines-for-oneline-inliners
>         c-semi&comma-inside-parenlist))
> ))

> but it still produces an auto-newline in every condition. What am
> I missing?

c-hanging-semi&comma-criteria is a list, not a function.

(add-hook 'c-mode-common-hook
          '(lambda ()
             (c-set-style "java")
             (setq c-auto-newline t)
             (setq c-hungry-delete-key t)
             (add-to-list 'c-hanging-semi&comma-criteria 
             (add-to-list 'c-hanging-semi&comma-criteria 


reply via email to

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