Emacs - override indentation

后端 未结 6 1234
悲&欢浪女
悲&欢浪女 2020-12-29 23:24

I have a multiply nested namespace:

namespace first {namespace second {namespace third {
              // emacs indents three times
    // I want to intend h         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 00:16

    With c++-mode in Emacs 23, I had to do like this:

    (defun my-c-setup ()
       (c-set-offset 'innamespace [4]))
    (add-hook 'c++-mode-hook 'my-c-setup)
    

    To disable the indentation in namespaces altogether, change [4] to 0.

提交回复
热议问题