I am writing a function that returns linguistic information about a character at a point. This is easy for predefined characters. However, I want to explain diacritics. I believe that they are referred to as “labels” or “combination of characters” in Unicode (see Plane U + 0300 - U + 036F).
For example, to place centralization diacritics (U + 0306) on the symbol e:
e C-x 8 <RET> 0306 <RET>
Run C-u C-x =on the resulting character, and you will see something like "Composed with the following characters:"
Functions such as following-char, unfortunately, return only the base character, i.e. “e,” and any combination of diacritics is ignored. Is there any way to get them?
EDIT : slitvinov noted that the resulting glyph consists of two characters. If you place a dot in front of the glyph created by the above code and execute (point)before and after launch forward-char, you will see a dot increase by 2. I decided that I could crack the solution using this behavior, but it seems that inside a progn(or the definition of a function), forward-charonly moves the point forward one ... try in defunor with (progn (forward-char) (point)). Why could this be?
source
share