lilypond-devel
[Top][All Lists]
Advanced

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

Re: Make emacs C++ style setting work for me (issue 333600043 by address


From: nine . fierce . ballads
Subject: Re: Make emacs C++ style setting work for me (issue 333600043 by address@hidden)
Date: Wed, 07 Feb 2018 05:07:28 -0800

Reviewers: Malte Meyn,

Message:
On 2018/02/07 07:41:09, Malte Meyn wrote:
“Make […] work for *me*” sounds as if this isn’t a general problem? I
don’t know
*anything* about emacs (except that vim is superior :P) but googling
c-default-style makes me wonder whether this isn’t only a problem of
your emacs
config.

I am using Emacs 25.3.1.  My experience was that when c-default-style
was set in the dir-locals, when I would open a lily/*.cc file,
c-default-style would indeed change locally to the value in dir-locals,
but the indentation mode of the buffer was set according to the original
value of c-default-style in my emacs configuration.

The documentation for c-indentation-style says this:

    Name of the currently installed style.
    Don’t change this directly; call ‘c-set-style’ instead, or set the
variable
    ‘c-file-style’ in the file’s Local Variable list.

Therefore, I tried setting c-file-style, and now the indentation mode is
correct.


Description:
Make emacs C++ style setting work for me

In the .dir-locals.el file for emacs, instead of setting
c-default-style, set c-file-style.  The former was not setting the style
for the files I opened.

Please review this at https://codereview.appspot.com/333600043/

Affected files (+1, -1 lines):
  M .dir-locals.el


Index: .dir-locals.el
diff --git a/.dir-locals.el b/.dir-locals.el
index 72472a6055d9deeb7eac214bb61e06e9cb8c74cc..69bd6cae380de8a31252ad45f33e78bcaa11dbbe 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -2,7 +2,7 @@
 ;;; See Info node `(emacs) Directory Variables' for more information.

 ((c++-mode
-  (c-default-style . "gnu")
+  (c-file-style . "gnu")
   (indent-tabs-mode))
  (scheme-mode
   (indent-tabs-mode))



reply via email to

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