[Top][All Lists]

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

char properties vs char properties: two different meanings

From: Drew Adams
Subject: char properties vs char properties: two different meanings
Date: Wed, 11 Sep 2013 10:18:42 -0700 (PDT)

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'.

#2 was added to our doc in Emacs 23.  It is terminology that comes from
outside Emacs (from Unicode).

Both are useful, each makes sense and is a good name for what it means.
But the two have nothing to do with each other.

Perhaps nothing should be done about the different meanings, and context
alone can be used to indicate which is meant.  Dunno.  Or perhaps someone
has a great suggestion, e.g., an alternative term for #1?   (We certainly
should not try to change #2 for Emacs, in any case.)

If we keep the same name for both meanings then perhaps the doc should at
least point out that the term is used in Emacs in two different ways.

It might also help to change the name of the manual node for #2, so that
someone using `g' to find info about #1 won't be misled.  But since #2
is not limited to Unicode character properties in Emacs I can't think of
a better node name offhand.  I.e., it would not be accurate to name the
node, say, `Unicode Character Properties' (which would help users looking
for #1 avoid this node).

One possibility that occurs to me is to take a suggestion from the function
names.  For #1 we have function `get-char-property'.  For #2 we have
`get-char-code-property'.  So perhaps we could, at least in the node name
for #2, for example, change `Character Properties' to `Character Code

Is "character code property" accurate?  If so, then we could also change
the text to use the same name: "character code property" instead of
"character property". If it is not really accurate then perhaps it would
still be OK (& helpful) to rename the node, but to use the proper
terminology in the explanation (node text).

reply via email to

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