aboutsummaryrefslogtreecommitdiff
path: root/gdb/.dir-locals.el
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-05-17 13:09:22 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-05-17 20:47:46 +0100
commitc1c0a7e1f39fda9f95bb94ecc5f39b189d69a76c (patch)
tree7f6cb0a8fc843a90bb52588fa3316c6e99f34822 /gdb/.dir-locals.el
parent9e541c7918c184aa226c1544159e37b6387ef205 (diff)
downloadgdb-c1c0a7e1f39fda9f95bb94ecc5f39b189d69a76c.zip
gdb-c1c0a7e1f39fda9f95bb94ecc5f39b189d69a76c.tar.gz
gdb-c1c0a7e1f39fda9f95bb94ecc5f39b189d69a76c.tar.bz2
gdb: additional settings for emacs in .dir-locals.el
Two additional settings for developers who use emacs: 1. Set brace-list-open to 0 for C and C++ modes, this ensures we format things like: enum blah { .... }; Instead of the default for the emacs GNU style: enum blah { ... }; The former seems to be the GDB style. 2. Set sentence-end-double-space to t. This is actually the default value for this setting, but if anyone has customised this to nil in general, then forcing this back to t for GDB files will give a better behaviour for the paragraph filling. gdb/ChangeLog: * .dir-locals.el: Set sentence-end-double-space for all modes, and set brace-list-open to 0 for C and C++ modes. gdbserver/ChangeLog: * .dir-locals.el: Set sentence-end-double-space for all modes, and set brace-list-open to 0 for C and C++ modes. gdbsupport/ChangeLog: * .dir-locals.el: Set sentence-end-double-space for all modes, and set brace-list-open to 0 for C and C++ modes.
Diffstat (limited to 'gdb/.dir-locals.el')
-rw-r--r--gdb/.dir-locals.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/.dir-locals.el b/gdb/.dir-locals.el
index 94c07dc..16641bb 100644
--- a/gdb/.dir-locals.el
+++ b/gdb/.dir-locals.el
@@ -22,12 +22,14 @@
(tcl-mode . ((tcl-indent-level . 4)
(tcl-continued-indent-level . 4)
(indent-tabs-mode . t)))
- (nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")))
+ (nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")
+ (sentence-end-double-space . t)))
(c-mode . ((c-file-style . "GNU")
(mode . c++)
(indent-tabs-mode . t)
(tab-width . 8)
(c-basic-offset . 2)
+ (eval . (c-set-offset 'brace-list-open 0))
(eval . (c-set-offset 'innamespace 0))
))
(c++-mode . ((eval . (when (fboundp 'c-toggle-comment-style)
@@ -36,6 +38,7 @@
(tab-width . 8)
(c-file-style . "GNU")
(c-basic-offset . 2)
+ (eval . (c-set-offset 'brace-list-open 0))
(eval . (c-set-offset 'innamespace 0))
))
)