[Top][All Lists]

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

Re: port x-symbol to GNU emacs 24.

From: Stephen J. Turnbull
Subject: Re: port x-symbol to GNU emacs 24.
Date: Mon, 17 Aug 2015 10:59:23 +0900

Uwe Brauer writes:

 > Ok, so I have to dig more into the code or hope that somebody in
 > xemacs-beta could point me out what is the GNU emacs equivalent to those
 > functions. I still wonder how x-symbol could have worked under GNU
 > emacs 21, given that extents and specifiers did not exist neither for
 > emacs 21.

AFAIK you're the only user left, and you've spent quite a bit of time,
both yours and others', on trying to keep this code working (which was
idiosyncratic when written, to say the least).  I'm giving up.  This
is my last post, ever, on x-symbol (except if necessary to veto
changes to XEmacs :-/ ).

Extents are a unification[1] of Emacs's overlays and text properties,
with a similar API.  Most likely you want to use the text property API
rather than the overlay API.

Specifiers are a unification and generalization of buffer-local and
frame-local variables[2], but with a rather different API that has to
be invoked explicitly to reference and mutate them, rather than being
a special type of variable that is referenced and mutated in the usual
way.  I suppose that you can probably ignore the specifier stuff,
however, and just use Customize to define the appropriate faces
(defface) which are selected for the x-symbol charset.

Another problem you'll run into in more recent GNU Emacs is that the
internal encoding (a UTF-8 extension) no longer has charsets in the
sense that Mule encoding did, as part of each character.  So you will
need to define a charset to hold the x-symbol characters (a Unicode
block, possibly in Unicode private space but perhaps outside of the
official range of Unicode scalars) using an API that is not relevant
to XEmacs, I suspect.

Note that it's probably possible to achieve what x-symbol does in 1/5
the code and without defining a new charset or glyphs by simply taking
advantage of the fact that most (all?) of those symbols are already in
Unicode.  I believe there are TeX add-ons that allow you to use them
instead of the traditional macros, as well, so you might not even need
to fiddle the display of the TeX file at all, and x-symbol would be
completely irrelevant.

[1]  IIRC, there's a corner case involving text properties that can't
be properly simulated using only extent properties, but it's otherwise

[2]  ISTR frame-locals have been deprecated or removed in recent Emacs?

reply via email to

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