[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default-text-properties
From: |
Luc Teirlinck |
Subject: |
Re: default-text-properties |
Date: |
Wed, 19 May 2004 22:01:11 -0500 (CDT) |
I understand now. I did not read the code carefully enough and I
forgot to remember something extra I did yesterday.
Fget_text_property calls `textget' which calls `lookup_char_property'
which contains the code:
tail = Fassq (prop, Vchar_property_alias_alist);
if (NILP (tail))
return tail;
In other words, default-text-properties is only consulted for foo if
char-property-alias-alist contains foo as a key. Hence:
(setq default-text-properties '(foo 69)
char-property-alias-alist nil)
nil
(set-text-properties 1 2 nil)
t
(get-text-property 1 'foo)
nil
But (I must have done something like this yesterday):
(setq default-text-properties '(foo 69)
char-property-alias-alist '((foo bar)))
((foo bar))
(set-text-properties 1 2 nil)
t
(get-text-property 1 'foo)
69
Completely undocumented (actually explicitly contradicted with the
above example) in the Elisp manual and the relevant docstrings. I
suspect this is a bug. If so, it is trivial to fix. If intentional,
it should be properly documented.
Sincerely,
Luc.