【发布时间】:2016-02-06 13:50:50
【问题描述】:
在 gnu emacs 中使用 elisp,我希望能够填充缓冲区中的所有文本,但用特殊标识符指示的文本除外。标识符几乎可以是任何东西,但为了这个问题,让我们假设它是介于 [nofill] 和 [/nofill] 标记之间的任何文本。
例如,假设我的缓冲区如下所示:
Now is the time
for all good
men to come to the aid
of their party. Now is
the time for all good
men to come to the aid
of their party.
[nofill]
The quick
brown fox
jumped over the
lazy sleeping dog
[/nofill]
When in the course of
human events, it becomes
it becomes necessary for one
people to dissolve the
political bands
[nofill]
baa-baa
black sheep,
have you
any wool
[/nofill]
在我正在寻找的那种填充之后,我希望缓冲区如下所示:
Now is the time for all good men to come to the aid of their
party. Now is the time for all good me to come to the aid of
their party
[nofill]
The quick
brown fox
jumped over the
lazy sleeping dog
[/nofill]
When in the course of human events, it becomes it becomes
necessary for one people to dissolve the political bands
[nofill]
baa-baa
black sheep,
have you
any wool
[/nofill]
我知道 elisp,我可以写一些东西来做到这一点。但是,在我尝试“重新发明轮子”之前,我想知道是否有人知道任何现有的 elisp 模块可能已经提供了此功能。
提前谢谢你。
【问题讨论】: