Hi,
the manual claims
,----[ info://lispref/Text+Properties ]
| Copying text between strings and buffers preserves the properties
| along with the characters; this includes such diverse functions as
| `substring', `insert', and `buffer-substring'.
`----
but if I try that I observe that (at least for me) weird behaviour.
Suppose I have an buffer in lisp-interaction-mode and font-lock-mode
(scratch). There is the defun
(defun foo ()
"Some doc string with a variable `var'"
(while foo bar))
from point 727 to 801.
So if I do
(insert (buffer-substring 727 801 "*scratch*"))
in a buffer without font-lock active (fundamental mode) the text
properties should be preserved. But all text properties get stripped
except these for the »`var'«. The difference is if you do a
`list-text-properties-at' that »`var'« has a list as face property
`list-text-properties-at' in scratch for »`var'»
,----
| Text properties at 778:
|
| font-lock t
| face (font-lock-reference-face font-lock-doc-string-face)
`----
All the other elements have a single element as the property face.
Is there an error in the manual in my understanding (most sure) of it
or in the preservation of text properties.
(I stumbled across that as I wanted to try out some code from
gnu.emacs.sources <lhel4exrq3.fsf(a)dodo.bluetail.com> )
bye
Karl
--
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe. "Lewis Carroll" "Jabberwocky"