そのため、Emacs では、ワード ラップは「塗りつぶし」と呼ばれ、M-qorによって行われM-x fill-paragraphます。改行しないはずのスペースを尊重するようにこの関数を変更する方法はありますか? たとえば、次の文があるとします。
This is a black sentence with a yellow word at the end.
Emacsにマーク50でfill-paragraphを指示すると、次のようにラップされます:
This is a black sentence with a yellow word at the
end.
ただし、同じことを行ってC-u M-x shell-command-on-regionを入力するとfold -sw 50、次の (正しい) 出力が得られます。
This is a black sentence with a yellow word at
the end.
同様の問題は、文の終わりに括弧内の何かが続く場合に発生します。
This is a black sentence with a yellow word here. (This is something in parens)
上記の文はM-q、次のようにマーク 50 でラップされます。
This is a black sentence with a yellow word
here. (This is something in parens)
ただし、fold -sw 50正しくラップします。
This is a black sentence with a yellow word here.
(This is something in parens)
を使用する関数を作成して使用できることはわかっていますfoldが、なぜfill-paragraphこのように動作するのか、および変更できるかどうかについて興味があります。