emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C style alist question?


From: Alan Mackenzie
Subject: Re: C style alist question?
Date: Thu, 11 Apr 2019 08:28:06 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]