From: "\"Jérôme M. Berger\"" <jeberger@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: Using current style in C?
Date: Mon, 04 Mar 2013 23:14:32 +0100 [thread overview]
Message-ID: <kh36c9$5d2$1@ger.gmane.org> (raw)
In-Reply-To: <jwvr4jvat5x.fsf-monnier+gmane.emacs.help@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]
Stefan Monnier wrote:
>> Once upon a time, I'll swear I read somewhere about being able to configure
>> C-mode to "use the current style", but now I can't find it. I'd like to use
>> such a feature.
>
> Check c-guess (in cc-guess.el).
>
Thanks, that could be very useful. However, I just tried adding the
following to my c-mode-hook to configure the style automatically
when I open a file:
(setq c-guess-guessed-basic-offset nil)
(setq c-guess-guessed-offsets-alist nil)
(c-guess-no-install)
(if c-guess-guessed-basic-offset
(setq c-basic-offset c-guess-guessed-basic-offset))
(if c-guess-guessed-offsets-alist
(setq c-offsets-alist c-guess-guessed-offsets-alist))
For some reason, this is horribly slow (takes several minutes to
complete). When I remove those lines and launch c-guess-no-install
interactively with M-x, then it is almost instantaneous (less than
one second). Anybody knows what's happening?
Thanks,
Jerome
--
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-03-04 22:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 15:04 Using current style in C? Doug Lewan
2013-03-04 18:59 ` Stefan Monnier
2013-03-04 21:38 ` Doug Lewan
2013-03-04 22:14 ` "Jérôme M. Berger" [this message]
2013-03-05 12:39 ` Doug Lewan
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='kh36c9$5d2$1@ger.gmane.org' \
--to=jeberger@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.