[Top][All Lists]

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

text.texi - `buffer-substring'

From: Andreas Roehler
Subject: text.texi - `buffer-substring'
Date: Fri, 23 Jun 2006 08:47:06 +0200
User-agent: Thunderbird (X11/20060516)

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))

ie text-properties are copied as a kind of comment
behind, not solely `along' as the info says. (Reading
the info I would understand, that the chars copied into
the returned string are propertized as the original
one, as it seems the case altogether.)

The mentioned copying effects eventually following procedures.

(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 ?

Andreas Roehler


GNU Emacs (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-06-18

X server distributor `The X.Org Foundation', version 11.0.60802000
Important settings:
 value of $LC_ALL: nil
 value of $LC_COLLATE: nil
 value of $LC_CTYPE: nil
 value of $LC_MESSAGES: nil
 value of $LC_MONETARY: nil
 value of $LC_NUMERIC: nil
 value of $LC_TIME: nil
 value of $LANG: de_DE.UTF-8
 locale-coding-system: utf-8
 default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
 icicle-mode: t
 global-hi-lock-mode: t
 hi-lock-mode: t
 auto-image-file-mode: t
 iswitchb-mode: t
 recentf-mode: t
 show-paren-mode: t
 tooltip-mode: t
 mouse-wheel-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 unify-8859-on-encoding-mode: t
 utf-translate-cjk-mode: t
 auto-compression-mode: t
 line-number-mode: t
 transient-mark-mode: t
 abbrev-mode: t

reply via email to

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