Auto-formatting a source file in emacs

前端 未结 6 845
旧巷少年郎
旧巷少年郎 2021-01-29 19:47

How do I apply a set of formatting rules to an existing source file in emacs?

Specifically I have an assembly (*.s) file, but I would like a generic command

6条回答
  •  死守一世寂寞
    2021-01-29 20:27

    The major mode it's using for your .s files won't be cc-mode hence c-set-style makes no sense. However you can always manually enter cc-mode (M-x cc-mode) and then do the c-set-style you want. However as the C styles are keyed for C source code and not assembler this is almost certainly not what you want to do.

提交回复
热议问题