How can I apply a new Emacs C style to reformat all my source files?

前端 未结 4 2211
心在旅途
心在旅途 2020-12-31 21:08

I\'d like to re-format all my source files using the Google formatting function for emacs: google-c-style.el (see here).

How can I apply this function to all my sour

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 21:44

    I believe that this script does not do reformatting. Instead it's an example of how to build a custom "style" as described in: CC mode manual - Styles

    CC-mode manual also says:

    If you want to reformat old code, you're probably better off using some other tool instead, e.g. GNU indent, which has more powerful reformatting capabilities than CC Mode.

    CC mode manual - Limitations-and-Known-Bugs

提交回复
热议问题