How to get rid of text attributes?
Stephen J. Turnbull
stephen at xemacs.org
Sun Dec 28 11:05:01 EST 2008
skip at pobox.com writes:
> I'm unclear on something though. I pasted your code into my *scratch*
> buffer. Keywords were highlighted in blue and the function names in red.
> When I copied and pasted into another non-Lisp buffer that highlighting was
> not copied with it. What is the difference between the annoyting (to me)
> *Occur* buffer contents and the highlighted Lisp code?
The *Occur* buffer uses text properties, which are duplicable extents
by default. That means that duplicable properties are copied with the
text. The highlighted Lisp code has had the duplicable property
stripped from its text properties, so its highlight extents are not
> Can't they both be done the same way?
In theory yes. However, font-lock (which performs the Lisp
highlighting) diverged eons ago; our font-lock is very different from
GNU's, so differences don't affect maintainability. I believe that
occur-mode is still very similar to GNU's version, so introducing
differences would have maintenance implications.
I have to wonder if the right thing isn't to see what happens if we
make text properties non-duplicable by default.
More information about the XEmacs-Beta