emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text.texi - `buffer-substring'


From: Eli Zaretskii
Subject: Re: text.texi - `buffer-substring'
Date: Fri, 23 Jun 2006 10:50:18 +0300

> Date: Fri, 23 Jun 2006 08:47:06 +0200
> From: Andreas Roehler <address@hidden>
> Cc: Richard Stallman <address@hidden>
> 
> Evaluation of the given example to `buffer-substring'
> produces a different result as shown in the manual.
> 
> Whereas the manual demonstrates
> 
>           ---------- Buffer: foo ----------
>           This is the contents of buffer foo
> 
>           ---------- Buffer: foo ----------
> 
>           (buffer-substring 1 10)
>                => "This is t"
> 
> I get
> 
> (buffer-substring 1 10)#("This is t" 0 1 (fontified t) 1 9 (fontified t))

I cannot reproduce this.  If the buffer `foo' is in Fundamental mode,
I get precisely what the manual says.

Your output suggests that the buffer with the text has font-lock
turned on.  Please see how could that happen in Fundamental mode.

> ie text-properties are copied as a kind of comment
> behind, not solely `along' as the info says.

That is normal behavior.

> (setq baz (buffer-substring 1 10))
> 
> baz --> #("This is t" 0 1 (fontified t) 1 9 (fontified t))
> 
> Maybe it's a `buffer-substring' bug ?

No, it's expected behavior when the buffer was fontified.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]