From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Newsgroups: gmane.emacs.help Subject: Re: how to set c-set-style at startup? Date: Wed, 20 Jul 2011 09:15:55 +0200 Organization: Micropit Message-ID: <87d3h5h178.fsf@micropit.couberia.bzh> References: <8762myyi93.fsf@micropit.couberia.bzh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1311146360 1878 80.91.229.12 (20 Jul 2011 07:19:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2011 07:19:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 20 09:19:17 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QjR3s-0000X8-Uc for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Jul 2011 09:19:17 +0200 Original-Received: from localhost ([::1]:44966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjR3r-0006mW-RQ for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Jul 2011 03:19:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjR0z-0006Yb-4O for help-gnu-emacs@gnu.org; Wed, 20 Jul 2011 03:16:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjR0w-0003vh-Po for help-gnu-emacs@gnu.org; Wed, 20 Jul 2011 03:16:16 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:37390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjR0w-0003vI-8o for help-gnu-emacs@gnu.org; Wed, 20 Jul 2011 03:16:14 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QjR0u-0007pc-8A for help-gnu-emacs@gnu.org; Wed, 20 Jul 2011 09:16:12 +0200 Original-Received: from arennes-651-1-220-25.w90-32.abo.wanadoo.fr ([90.32.95.25]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Jul 2011 09:16:12 +0200 Original-Received: from pmlists by arennes-651-1-220-25.w90-32.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Jul 2011 09:16:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-220-25.w90-32.abo.wanadoo.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:HG8UBHWQlO5rRogtG24Mo2yBDVQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:81692 Archived-At: On Wed, Jul 20 2011, Jai Dayal wrote: > I tried this, but it doesn't seem to be working. Example? Emacs-version? This works for me: emacs -Q M-: (add-hook 'c-mode-hook '(lambda () (c-set-style "linux"))) open "foo.c" C-h v c-indentation-style -> result = "linux" > For example, I change the > style to the style I have in the code below, and the indentation will be > different. To be expected, isn't it? > I can also put in garbage instead of "linux" and no errors occur.  I get "Undefined style: garbage" in the *Messages* buffer. -- Peter