其主要功能,在不同的文件里插入另外一个文件的内容(不是链接,是整个文字块),主要使用 API 是 emacs 在 22.1 新增的 text-clone
。
Emacs 的潜力还没完全发挥…
text-clone-create is a byte-code-function in ‘subr.el’.
(text-clone-create START END &optional SPREADP SYNTAX)
Create a text clone of START...END at point.
Text clones are chunks of text that are automatically kept identical:
changes done to one of the clones will be immediately propagated to the other.
The buffer’s content at point is assumed to be already identical to
the one between START and END.
If SYNTAX is provided it’s a regexp that describes the possible text of
the clones; the clone will be shrunk or killed if necessary to ensure that
its text matches the regexp.
If SPREADP is non-nil it indicates that text inserted before/after the
clone should be incorporated in the clone.
Probably introduced at or before Emacs version 22.1.