From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: C style alist question? Date: Thu, 11 Apr 2019 08:28:06 +0000 Message-ID: <20190411082806.GA4093@ACM> References: <20190406032636.7ftf2ua54uhy2k7e@Ergus> <837ec7bpe4.fsf@gnu.org> <20190411011659.zplon3n3lrtqmb2i@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="12940"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: help-gnu-emacs@gnu.org, emacs-devel@gnu.org To: Ergus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 10:34:25 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEVA9-0003Ep-DA for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2019 10:34:25 +0200 Original-Received: from localhost ([127.0.0.1]:43912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEVA8-0001iD-Ci for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2019 04:34:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEV9m-0001b0-9h for help-gnu-emacs@gnu.org; Thu, 11 Apr 2019 04:34:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEV46-0006qP-VO for help-gnu-emacs@gnu.org; Thu, 11 Apr 2019 04:28:12 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:17887 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1hEV46-0006oF-OI for help-gnu-emacs@gnu.org; Thu, 11 Apr 2019 04:28:10 -0400 Original-Received: (qmail 47063 invoked by uid 3782); 11 Apr 2019 08:28:07 -0000 Original-Received: from acm.muc.de (p4FE15DBC.dip0.t-ipconnect.de [79.225.93.188]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 11 Apr 2019 10:28:06 +0200 Original-Received: (qmail 5162 invoked by uid 1000); 11 Apr 2019 08:28:06 -0000 Content-Disposition: inline In-Reply-To: <20190411011659.zplon3n3lrtqmb2i@Ergus> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:119917 gmane.emacs.devel:235272 Archived-At: Hello, Ergus. On Thu, Apr 11, 2019 at 03:16:59 +0200, Ergus wrote: > (I send to both mailing lists because it is related with a previous > thread, but the right destination for this mail is the devels mailing > list) > Hi guys: > The issue I was facing with indentations was related actually with the > fact that once an offset is set (for example in the init file) it is > ignored in some cases by c-set-style because it is not "from style" > anymore. The answer here is Read The Fantastic Manual. :-) In particular, the CC Mode manual, page "Config Basics", explains how settings made in different ways get resolved, and which one "wins". > Does it makes sense (or is not too difficult) to provide an option (or a > parameter in c-set-style) that allows the user to overwrite all the > previous offsets with the values from the new style, in spite of if it > is not "from style"? Maybe it already exist? The thinking is that users, mostly, will be using the style system, or possibly setting buffer local values in hooks (e.g. c-mode-common-hook). And that anybody setting the global value of a style variable Really Means It. To supply the option you're suggesting would be quite difficult, yes, since it would mean rethinking the entire way CC Mode handles the style variables. To the five ways of setting style variables listed on that manual page, could (should) be added the directory local settings. The interaction between them all is quite involved. I would ask you to read that manual page thoroughly, and see if it provides you with a way to configure CC Mode adequate to your needs. If not, then maybe we could come back to the question. > Another question: [ For another reply :-] > Thanks in advance, > Ergus. -- Alan Mackenzie (Nuremberg, Germany).