From: Magnus Therning <magnus@therning.org>
To: Emacs Help <help-gnu-emacs@gnu.org>
Subject: cc-mode and setting c-label-minimum-indentation
Date: Sun, 6 Sep 2015 18:30:08 +0200 [thread overview]
Message-ID: <20150906163008.GA25918@tatooine> (raw)
[-- 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 --]
reply other threads:[~2015-09-06 16:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150906163008.GA25918@tatooine \
--to=magnus@therning.org \
--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.
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).