[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: char properties vs char properties: two different meanings
From: |
Eli Zaretskii |
Subject: |
Re: char properties vs char properties: two different meanings |
Date: |
Wed, 11 Sep 2013 22:31:02 +0300 |
> Date: Wed, 11 Sep 2013 10:18:42 -0700 (PDT)
> From: Drew Adams <address@hidden>
>
> Not sure what a good solution might be, but we have a terminology problem:
> there are two completely different notions of "character property" used
> in Emacs Lisp:
>
> 1. A character property is either a text property or an overlay property.
> It is what function `get-char-property' returns. It is good to have
> a term that covers both. I use it in doc for functions I have that
> act on either, for instance.
>
> 2. A character property is a named attribute of a character...
> See (elisp) `Character Properties'.
No, we have only 1 "character property": the second one you mention.
The first one lives in function names and is called "char-property".
This is unfortunate (and has bad mnemonic value, IMO), but that's
water under the bridge, because these APIs existed long before Emacs
started supporting Unicode.
> Is "character code property" accurate?
No. There's no property to the "code" of the character. The addition
of "code" was a kludge, to work around the fact that char-property was
already taken.
But please don't confuse API names and terminology. They don't need
to be 100% the same. It's good if they are, but it's not a
catastrophe if they aren't.
Just stop talking about character properties in the first sense in
human-readable text, such as doc strings. The manual doesn't use
"char property" anywhere.