バッチモードでemacsを使用してActionScriptファイルをきれいに印刷しようとしていますが、期待どおりの結果が得られません。ここhttp://blog.pettomato.com/?p=12からactionscript-mode.elとas-config.elをダウンロード し、それらをホームディレクトリに配置して、actionscript-mode.elを作業ディレクトリに複製しました。次に、ホームディレクトリにも次の内容のファイル「.emacs」を作成しました。
(load "~/actionscript-mode.el")
(actionscript-mode)
(indent-region 0 (buffer-size) nil)
(save-buffer)
次に、誤ってフォーマットされた.asファイルのあるディレクトリに移動し、コマンドラインで次のコマンドを実行します。
emacs -batch WrongFormat.as -l ~/.emacs -l actionscript-mode.el
And I get:
Loading /Users/pnm/actionscript-mode.el (source)...
Indenting region...
Indenting region... done
(No changes need to be saved)
今の質問は:
emacsに中括弧を改行しないように再フォーマットするにはどうすればよいですか?私は必死になっていて、木の棒で50ヒットすることが、コードスタイルガイドを適用するための良い代替手段であるかどうかはわかりません。