diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-12-07 10:45:01 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-12-07 23:20:30 +0000 |
commit | d9c859da9fff9de47a33f52d75a6fef2495b3fc1 (patch) | |
tree | 6736df867c7da87d4f4c127fe8cd3dc6ed4acf05 /bfd | |
parent | 42e151bf4cc66b8781f2b139c6da320095f9a045 (diff) | |
download | gdb-d9c859da9fff9de47a33f52d75a6fef2495b3fc1.zip gdb-d9c859da9fff9de47a33f52d75a6fef2495b3fc1.tar.gz gdb-d9c859da9fff9de47a33f52d75a6fef2495b3fc1.tar.bz2 |
gdb/emacs/dir-locals: Update settings for c++-mode
The current .dir-locals file for GDB causes files that would usually
open in c-mode (for example, files ending in .c) to open in c++-mode.
However, all of the other settings applied for c-mode appear to get
reset when the file is switched over to c++-mode.
For example, we currently say:
(c-mode . ((c-file-style . "GNU")
(mode . c++)
(indent-tabs-mode . t)
(tab-width . 8)
(c-basic-offset . 2)
(eval . (c-set-offset 'innamespace 0))
))
(c++-mode . ((eval . (when (fboundp 'c-toggle-comment-style)
(c-toggle-comment-style 1)))))
So, when we enter c++-mode `indent-tabs-mode` is reset to its global
value, as are all of the other settings listed for c-mode.
This commit copies all of the settings (except the `mode` setting)
from the c-mode list to the c++-mode list.
The emacs documentation doesn't mention that `mode` causes this
resetting behaviour, so, in case this is an emacs bug, I'm using emacs
version 26.1. Having the settings duplicated shouldn't cause any
problems except for a slight maintenance overhead.
gdb/ChangeLog:
* .dir-locals.el: Copy most of the settings from c-mode over to
c++-mode.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions