Skip to content

Commit c1c0a7e

Browse files
committed
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.
1 parent 9e541c7 commit c1c0a7e

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

gdb/.dir-locals.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
(tcl-mode . ((tcl-indent-level . 4)
2323
(tcl-continued-indent-level . 4)
2424
(indent-tabs-mode . t)))
25-
(nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")))
25+
(nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")
26+
(sentence-end-double-space . t)))
2627
(c-mode . ((c-file-style . "GNU")
2728
(mode . c++)
2829
(indent-tabs-mode . t)
2930
(tab-width . 8)
3031
(c-basic-offset . 2)
32+
(eval . (c-set-offset 'brace-list-open 0))
3133
(eval . (c-set-offset 'innamespace 0))
3234
))
3335
(c++-mode . ((eval . (when (fboundp 'c-toggle-comment-style)
@@ -36,6 +38,7 @@
3638
(tab-width . 8)
3739
(c-file-style . "GNU")
3840
(c-basic-offset . 2)
41+
(eval . (c-set-offset 'brace-list-open 0))
3942
(eval . (c-set-offset 'innamespace 0))
4043
))
4144
)

gdb/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2021-05-17 Andrew Burgess <[email protected]>
2+
3+
* .dir-locals.el: Set sentence-end-double-space for all modes, and
4+
set brace-list-open to 0 for C and C++ modes.
5+
16
2021-05-17 Tom Tromey <[email protected]>
27

38
* dwarf2/loc.c (dwarf2_evaluate_loc_desc::get_frame_base): Throw

gdbserver/.dir-locals.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
(tcl-mode . ((tcl-indent-level . 4)
2323
(tcl-continued-indent-level . 4)
2424
(indent-tabs-mode . t)))
25-
(nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")))
25+
(nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")
26+
(sentence-end-double-space . t)))
2627
(c-mode . ((c-file-style . "GNU")
2728
(mode . c++)
2829
(indent-tabs-mode . t)
2930
(tab-width . 8)
3031
(c-basic-offset . 2)
32+
(eval . (c-set-offset 'brace-list-open 0))
3133
(eval . (c-set-offset 'innamespace 0))
3234
))
3335
(c++-mode . ((eval . (when (fboundp 'c-toggle-comment-style)
@@ -36,6 +38,7 @@
3638
(tab-width . 8)
3739
(c-file-style . "GNU")
3840
(c-basic-offset . 2)
41+
(eval . (c-set-offset 'brace-list-open 0))
3942
(eval . (c-set-offset 'innamespace 0))
4043
))
4144
)

gdbserver/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2021-05-17 Andrew Burgess <[email protected]>
2+
3+
* .dir-locals.el: Set sentence-end-double-space for all modes, and
4+
set brace-list-open to 0 for C and C++ modes.
5+
16
2021-05-08 Simon Marchi <[email protected]>
27

38
* linux-low.cc (linux_process_target::wait_for_event_filtered):

gdbsupport/.dir-locals.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
(tcl-mode . ((tcl-indent-level . 4)
2323
(tcl-continued-indent-level . 4)
2424
(indent-tabs-mode . t)))
25-
(nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")))
25+
(nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s")
26+
(sentence-end-double-space . t)))
2627
(c-mode . ((c-file-style . "GNU")
2728
(mode . c++)
2829
(indent-tabs-mode . t)
2930
(tab-width . 8)
3031
(c-basic-offset . 2)
32+
(eval . (c-set-offset 'brace-list-open 0))
3133
(eval . (c-set-offset 'innamespace 0))
3234
))
3335
(c++-mode . ((eval . (when (fboundp 'c-toggle-comment-style)
@@ -36,6 +38,7 @@
3638
(tab-width . 8)
3739
(c-file-style . "GNU")
3840
(c-basic-offset . 2)
41+
(eval . (c-set-offset 'brace-list-open 0))
3942
(eval . (c-set-offset 'innamespace 0))
4043
))
4144
)

gdbsupport/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2021-05-17 Andrew Burgess <[email protected]>
2+
3+
* .dir-locals.el: Set sentence-end-double-space for all modes, and
4+
set brace-list-open to 0 for C and C++ modes.
5+
16
2021-05-08 Simon Marchi <[email protected]>
27

38
* Makefile.in: Re-generate.

0 commit comments

Comments
 (0)