unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* cc-mode and setting c-label-minimum-indentation
@ 2015-09-06 16:30 Magnus Therning
  0 siblings, 0 replies; only message in thread
From: Magnus Therning @ 2015-09-06 16:30 UTC (permalink / raw)
  To: Emacs Help

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

I've created a `.dir-locals.el` in a C project I work on:

~~~
((nil . ())
 (c-mode . ((c-file-style . "stroustrup")))
 )
~~~

However, when visiting a file in the project all labels have a minimum
indent of 1.  After quite a bit of digging I found that this behaviour
comes from `'c-label-minimum-indentation` and the GNU hook.

My questions:

1. Why is the GNU hook there at all?  (As far as I understand the
   Stroustrup style shouldn't include it.)
2. Is it possible to control the minimum label indentation from the
   style?
3. Apparently `'c-label-minimum-indentation` isn't safe for dir local
   settings, so what does the typical Emacs user do, mark the value 0
   as safe for `'c-label-minimum-indentation`, or simple set it to 0
   in `~/.emacs.d/init.el`?

Thankful for any and all answers/suggestions/replies.

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus@therning.org   jabber: magnus@therning.org
twitter: magthe               http://therning.org/magnus

Most software today is very much like an Egyptian pyramid with
millions of bricks piled on top of each other, with no structural
integrity, but just done by brute force and thousands of slaves.
     -- Alan Kay

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

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

only message in thread, other threads:[~2015-09-06 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-06 16:30 cc-mode and setting c-label-minimum-indentation Magnus Therning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).