all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Damien Wyart <damien.wyart@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: c-auto-newline question
Date: Thu, 10 Jan 2013 09:52:09 +0100	[thread overview]
Message-ID: <50ee8139$0$2271$426a74cc@news.free.fr> (raw)
In-Reply-To: mailman.17033.1357807327.855.help-gnu-emacs@gnu.org

* Luca Ferrari <fluca1978@infinito.it> in gnu.emacs.help:
> I've configured c-auto-newline for my code editing, and it is great
> but I'd like to have the newline added when ";" is typed only if the
> following line is empty or not-existent yet. In other words, if I'm
> editing a line in the middle of the code, I don't want ";" to add an
> empty line if the following contains other code. Is this possible?

Yes, as explained here
http://www.gnu.org/software/emacs/manual/html_mono/ccmode.html#Hanging-Semicolons-and-Commas
this is possible.

You have to rely on the function c-semi&comma-no-newlines-before-nonblanks.

-- 
DW


       reply	other threads:[~2013-01-10  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.17033.1357807327.855.help-gnu-emacs@gnu.org>
2013-01-10  8:52 ` Damien Wyart [this message]
2013-01-10  9:22   ` c-auto-newline question Luca Ferrari
     [not found]   ` <mailman.17034.1357809745.855.help-gnu-emacs@gnu.org>
2013-01-10  9:42     ` Damien Wyart
2013-01-10 14:46       ` Luca Ferrari
     [not found]       ` <mailman.17050.1357829207.855.help-gnu-emacs@gnu.org>
2013-01-10 16:30         ` Damien Wyart
2013-01-11  8:51           ` Luca Ferrari
2013-01-10  8:42 Luca Ferrari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='50ee8139$0$2271$426a74cc@news.free.fr' \
    --to=damien.wyart@free.fr \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.