From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luca Ferrari Newsgroups: gmane.emacs.help Subject: Re: c-auto-newline question Date: Thu, 10 Jan 2013 10:22:19 +0100 Message-ID: References: <50ee8139$0$2271$426a74cc@news.free.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1357809751 9504 80.91.229.3 (10 Jan 2013 09:22:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2013 09:22:31 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Damien Wyart Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 10 10:22:48 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 1TtELV-000146-Qh for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 10:22:45 +0100 Original-Received: from localhost ([::1]:49630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtELF-0004oR-TN for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 04:22:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtEL9-0004oL-Gi for help-gnu-emacs@gnu.org; Thu, 10 Jan 2013 04:22:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtEL6-0000Lr-LT for help-gnu-emacs@gnu.org; Thu, 10 Jan 2013 04:22:23 -0500 Original-Received: from mail-wg0-f51.google.com ([74.125.82.51]:39198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtEL6-0000Lf-DY for help-gnu-emacs@gnu.org; Thu, 10 Jan 2013 04:22:20 -0500 Original-Received: by mail-wg0-f51.google.com with SMTP id gg4so133606wgb.6 for ; Thu, 10 Jan 2013 01:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=DSCUrL69cFSP15kRercgs5YkgEhc+4fiRZAixtfiol0=; b=Rs4y6FBw3bB42VqZVFoGe5vCPkpuhJhHtysUYpIa3b9MFa4GemnnmuffZ6JQSF/Keo 4k2acVFKWcPRKKf99ISFJ7ERcd1hW69dnDHoTaP5IDURu4/VBghuIYOIT/RKCkf0GHMg gkDbkPyhJIWEjenOSY292Hv7KQirkxuV/g7McM4hQWDDkt5ZWG7eOh2fWH346Wvd5Ymb Yh1NgIE6s5YH79AK17MHKcEq1ID3AVTpyvONTvrLKd4+FYZBkDHuN58M3HFeuNv7bjib VD8WIqNJIYyMlgpw/tM8HnpQyqQgiyNUuOx+Q1DvMqv6bCvO7Dd0gP7XPBpqwEgQPpA2 DKfg== Original-Received: by 10.180.24.133 with SMTP id u5mr7907522wif.17.1357809739749; Thu, 10 Jan 2013 01:22:19 -0800 (PST) Original-Received: by 10.194.30.103 with HTTP; Thu, 10 Jan 2013 01:22:19 -0800 (PST) In-Reply-To: <50ee8139$0$2271$426a74cc@news.free.fr> X-Google-Sender-Auth: jNufEzfVEI-f2akDoyQVe92axQc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.51 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:88548 Archived-At: Thanks Damien, 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? Thanks, Luca