|
From: Andreas A. <ar...@li...> - 2018-12-03 19:13:27
|
On Sat, Dec 01 2018, Bart Van Assche wrote: > On 11/21/18 8:47 AM, Andreas Arnez wrote: >> diff --git a/coregrind/m_demangle/demangle.c b/coregrind/m_demangle/demangle.c >> index 00fa20389..dd933da8b 100644 >> --- a/coregrind/m_demangle/demangle.c >> +++ b/coregrind/m_demangle/demangle.c >> @@ -1,3 +1,4 @@ >> +/* -*- mode: C; buffer-read-only: nil -*- */ >> /*--------------------------------------------------------------------*/ >> /*--- Demangling of C++ mangled names. demangle.c ---*/ >> diff --git a/coregrind/m_demangle/vg_libciface.h b/coregrind/m_demangle/vg_libciface.h >> index 762e63a02..1aefd5db3 100644 >> --- a/coregrind/m_demangle/vg_libciface.h >> +++ b/coregrind/m_demangle/vg_libciface.h >> @@ -1,3 +1,4 @@ >> +/* -*- mode: C; buffer-read-only: nil -*- */ > > Can this be left out? I'd like to avoid mode lines in source files. Not sure. Do you know another way to exempt these files from being marked read-only? > >> diff --git a/drd/tests/.dir-locals.el b/drd/tests/.dir-locals.el >> new file mode 100644 >> index 000000000..0d94ded88 >> --- /dev/null >> +++ b/drd/tests/.dir-locals.el >> @@ -0,0 +1,16 @@ >> +;; Emacs settings for drd tests. >> + >> +( >> + ;; Standard settings for editing C source files. >> + (c-mode . ( >> + ;; Apply the Linux style as a base. >> + (c-file-style . "linux") >> + ;; Use spaces instead of tabs for indentation. >> + (indent-tabs-mode . nil) >> + ;; Indent 2 columns per level. Note that this differs from >> + ;; the usual Valgrind style. >> + (c-basic-offset . 2) >> + ;; Lines should be limited to 80 columns. >> + (fill-column . 80) >> + )) >> +) > > Is it possible to combine the top-level .dir-locals.el file and this file > into a single file? If not, don't worry. If you know how, I'd be interested... > > How about Helgrind? Are files in helgrind/tests indented by 2 or by 3 > columns? Is a similar file needed in helgrind/tests? The C source files in that directory use various different indentation widths, sometimes even within the same file. I haven't measured which of these occurs most often, but it's certainly not obvious. So maybe we could just as well postulate that these files should converge to Valgrind's usual style. What do you think? > > Sorry for being slow in replying. > > Thanks, > > Bart. |