]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add Emacs configuration files
authorAndreas Arnez <arnez@linux.ibm.com>
Wed, 5 Dec 2018 16:07:05 +0000 (17:07 +0100)
committerBart Van Assche <bvanassche@acm.org>
Thu, 6 Dec 2018 02:15:57 +0000 (18:15 -0800)
This adds a configuration file ".dir-locals.el" for Emacs to the topmost
directory of the Valgrind source tree, and another such file to the
directory drd/tests.  These files contain per-directory local Emacs
variables.

The following settings are performed:

* The base C style is set to "Linux", indentation is set to 3 columns
  per level, the use of tabs for indentation is disabled, and the fill
  column is set to 80.

* The source files in drd/tests use 2 instead of 3 columns per indentation
  level.

.dir-locals.el [new file with mode: 0644]
drd/tests/.dir-locals.el [new file with mode: 0644]

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644 (file)
index 0000000..5957ed9
--- /dev/null
@@ -0,0 +1,18 @@
+;; Emacs settings for Valgrind.
+
+(
+ ;; Format used to turn a bug number into a URL (when displaying it).
+ (nil . ((bug-reference-url-format . "http://bugs.kde.org/show_bug.cgi?id=%s")))
+
+ ;; 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 3 columns per level.
+           (c-basic-offset . 3)
+           ;; Lines should be limited to 80 columns.
+           (fill-column . 80)
+          ))
+)
diff --git a/drd/tests/.dir-locals.el b/drd/tests/.dir-locals.el
new file mode 100644 (file)
index 0000000..0d94ded
--- /dev/null
@@ -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)
+          ))
+)