I'm trying to batch indent source files using emacs. I'm using the command:
$ emacs -batch Source.h -l emacs-format-file.el -f emacs-format-function
where emacs-format-file.el contains:
(defun emacs-format-function ()
(c-set-style "gnu")
(setq c-basic-offset 4)
(c-set-offset 'access-label nil)
(c-set-offset 'substatement-open 0)
(indent-region (point-min) (point-max) nil)
(untabify (point-min) (point-max))
(save-buffer)
)
Emacs indents the file to my liking with one exception. The "public", "private", and "protected" keywords are all indented an extra space:
class Foo
{
-public:
+ public:
I want to align these keywords with the preceding open bracket. Based on this question I thought setting 'access-label' would fix this but it doesn't seem to have any effect.
What am I missing?