From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= Newsgroups: gmane.emacs.help Subject: Re: Using current style in C? Date: Mon, 04 Mar 2013 23:14:32 +0100 Message-ID: References: <155DEC68569B714B86C2C7075F5EDA9828E8F727@DAKIYA1.pegasus.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig50CBBFCE91A13876E0C8812A" X-Trace: ger.gmane.org 1362435307 5834 80.91.229.3 (4 Mar 2013 22:15:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Mar 2013 22:15:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 04 23:15:31 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCdfO-0005yL-53 for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Mar 2013 23:15:30 +0100 Original-Received: from localhost ([::1]:38420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCdf2-0006yZ-Kb for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Mar 2013 17:15:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCdeq-0006yD-Jk for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 17:14:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCdep-0006ae-5N for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 17:14:56 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:38216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCdeo-0006Yf-UK for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 17:14:55 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UCdf8-0005io-Rg for help-gnu-emacs@gnu.org; Mon, 04 Mar 2013 23:15:14 +0100 Original-Received: from def92-4-82-224-197-72.fbx.proxad.net ([82.224.197.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Mar 2013 23:15:14 +0100 Original-Received: from jeberger by def92-4-82-224-197-72.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Mar 2013 23:15:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: def92-4-82-224-197-72.fbx.proxad.net User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.24) Gecko/20120206 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 In-Reply-To: X-Enigmail-Version: 0.96.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89349 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig50CBBFCE91A13876E0C8812A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Stefan Monnier wrote: >> Once upon a time, I'll swear I read somewhere about being able to conf= igure >> C-mode to "use the current style", but now I can't find it. I'd like t= o use >> such a feature. >=20 > Check c-guess (in cc-guess.el). >=20 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 --=20 mailto:jeberger@free.fr http://jeberger.free.fr Jabber: jeberger@jabber.fr --------------enig50CBBFCE91A13876E0C8812A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlE1HMwACgkQd0kWM4JG3k9wNwCffZCrhSBlvbFNWqs2dbIcbXdb RGUAoK08O8fzkBU5zL8Ye1TWmzE01DyG =2pow -----END PGP SIGNATURE----- --------------enig50CBBFCE91A13876E0C8812A--