all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* c-mode & indenting block comments
@ 2008-09-17 15:30 jrwats
  0 siblings, 0 replies; only message in thread
From: jrwats @ 2008-09-17 15:30 UTC (permalink / raw)
  To: help-gnu-emacs

So I'm working on some legacy code that has comments appearing like
so:
/*---------------------------------------*\
 * Sample Comment
 * blah blah blah
\*---------------------------------------*/

The problem, (I'm using the Stroustrup c-indentation-style - but this
occurs for all of them) when I run my favorite file cleanup key
sequence of:
C-x h
C-M-\

and get everything tabbed nice and pretty is that I end up with the
last line of the comment block shifted one to the right.
/*---------------------------------------*\
 * Sample Comment
 * blah blah blah
 \*---------------------------------------*/

Is there a c-indentation-style setting I can create to tell c-mode (or
whoever is responsible here) to leave all block comments where they
currently are and don't try tabbifying them?

Basically anywhere between /* and */ I want off limits for c-mode's
indentation.

I've played with setting the c attribute in c-offsets-alist to nil and
0, but that just placed the *'s in the middle all the way to the left
and I had played with c-comment-only-line-offset, trying:
(c-comment-only-line-offset . nil)
(c-comment-only-line-offset . 0)
(c-comment-only-line-offset . 0 . 0)
having all fail.

I really don't want to resort to:
Search and replace ' \*' with '\*'


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-17 15:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 15:30 c-mode & indenting block comments jrwats

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.