diff --git a/gdb/.dir-locals.el b/gdb/.dir-locals.el index fbd9309aef..c32846a137 100644 --- a/gdb/.dir-locals.el +++ b/gdb/.dir-locals.el @@ -20,5 +20,10 @@ (indent-tabs-mode . t))) (nil . ((bug-reference-url-format . "http://sourceware.org/bugzilla/show_bug.cgi?id=%s"))) (c-mode . ((c-file-style . "GNU") - (indent-tabs-mode . t))) + (mode . c++) + (indent-tabs-mode . t) + (tab-width . 8) + (c-basic-offset . 2) + (eval . (c-set-offset 'innamespace 0)) + )) ) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0f4e3a949e..233a43c375 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2016-12-20 Antoine Tremblay + + * .dir-locals.el: Set c++ mode for the directory and set indent + properly. + * gdb-code-style.el: Set c-set-offset 'innamespace as a safe value + to be used in .dir-locals.el. + 2016-12-16 Bernhard Heckel * darwin-nat-info.c (info_mach_region_command): Use expression_up. diff --git a/gdb/gdb-code-style.el b/gdb/gdb-code-style.el index 6099c1d4b8..a7f4d8b832 100644 --- a/gdb/gdb-code-style.el +++ b/gdb/gdb-code-style.el @@ -74,4 +74,9 @@ ) (add-hook 'c-mode-common-hook 'gdb-comment-hook) +;; Set c-set-offset 'innamespace as a safe value to be used in .dir-locals.el. +(setq safe-local-variable-values + (cons safe-local-variable-values + '((eval c-set-offset 'innamespace 0) + (c-offsets-alist (innamespace . 0))))) ;;; gdb-code-style.el ends here