From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: default-text-properties Date: Wed, 19 May 2004 22:01:11 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200405200301.i4K31BR18694@raven.dms.auburn.edu> References: <200405200133.i4K1XMT18564@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1085022246 23586 80.91.224.253 (20 May 2004 03:04:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 May 2004 03:04:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 20 05:03:57 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQdqf-0001dB-00 for ; Thu, 20 May 2004 05:03:57 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQdqe-0000JT-00 for ; Thu, 20 May 2004 05:03:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQdqO-00015h-Kf for emacs-devel@quimby.gnus.org; Wed, 19 May 2004 23:03:40 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BQdpu-0000rq-Bd for emacs-devel@gnu.org; Wed, 19 May 2004 23:03:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BQdpO-0000Sq-A3 for emacs-devel@gnu.org; Wed, 19 May 2004 23:03:09 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQdoM-0008N7-Ei for emacs-devel@gnu.org; Wed, 19 May 2004 23:01:34 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i4K31XTS014838; Wed, 19 May 2004 22:01:33 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i4K31BR18694; Wed, 19 May 2004 22:01:11 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200405200133.i4K1XMT18564@raven.dms.auburn.edu> (message from Luc Teirlinck on Wed, 19 May 2004 20:33:22 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23756 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23756 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.