all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: default-text-properties
Date: Wed, 19 May 2004 22:01:11 -0500 (CDT)	[thread overview]
Message-ID: <200405200301.i4K31BR18694@raven.dms.auburn.edu> (raw)
In-Reply-To: <200405200133.i4K1XMT18564@raven.dms.auburn.edu> (message from Luc Teirlinck on Wed, 19 May 2004 20:33:22 -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.

  reply	other threads:[~2004-05-20  3:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20  1:33 default-text-properties Luc Teirlinck
2004-05-20  3:01 ` Luc Teirlinck [this message]
2004-05-20  3:12   ` default-text-properties Luc Teirlinck
2004-05-20  3:20     ` default-text-properties Luc Teirlinck
2004-05-20 13:17     ` default-text-properties Richard Stallman
2004-05-20 13:17   ` default-text-properties Richard Stallman
2004-05-20 17:40     ` default-text-properties Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405200301.i4K31BR18694@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.