emacs-devel
[Top][All Lists]
Advanced

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

Yet another problem with default-text-properties


From: Luc Teirlinck
Subject: Yet another problem with default-text-properties
Date: Wed, 19 May 2004 22:50:55 -0500 (CDT)

Consider the following ielm run:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (make-local-variable 'default-text-properties)
default-text-properties
ELISP> (setq default-text-properties '(foo 69))
(foo 69)

ELISP> (setq char-property-alias-alist '((foo bar)))
((foo bar))

ELISP> (setq str "01")
"01"
ELISP> (get-text-property 1 'foo str)
69
ELISP> 

Now this might look perfectly as expected.

However, does this mean that whenever one constructs any strings, or
calls any command that could be constructing strings, that are not
directly related to the current buffer's mode, one should always bind
default-text-properties to nil?  For instance, enriched mode specifies
a buffer-local value for default-text-properties.  That value seems to
be meant for text to be inserted in the buffer, but it will also apply
to completely unrelated strings constructed while the buffer is
current.

Does that not seem somewhat bizarre?

Sincerely,

Luc.





reply via email to

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