"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)xemacs.org> writes:
Hrvoje> But imagine trying to port the extents API or the
Hrvoje> specifier API under FSF.
Agreed, those really can't be done in full. But there is a
compatibility layer for extents available for GNU Emacs somewhere,
that's about as good as overlay.el for those things where text
properties are the wrong API.
I would like to see that compatibility layer. The best I've seen were
very basic, pretty much unusable unless you use `map-extents' in the
most trivial way.
And Custom replicates most of what specifiers do, more or less, plus
a couple of small tweaks that apparently specifiers can't do by
themselves currently.
Custom implements a flexible scheme for setting, saving, and restoring
variable and face settings. It does a pretty good job for variables
and somewhat less good job for faces, but its functionality is
different from that of specifiers. For example, Custom won't allow
you to make a face green in one buffer and red in the other, to take a
silly example out of the specifier documentation.
It is almost impossible to implement specifiers on top of FSF Emacs.
Hrvoje> Not to mention things like toolbar APIs, glyphs,
keymaps,
Hrvoje> etc.
The glyph issues reduce to specifier issues.
Which doesn't mean they're covered by anything out there.
But I'm really getting off the tangent here. I don't even *like* our
specifier and glyph API's, so I wouldn't want them inflicted on anyone
else. I was just trying to make a point that porting our API's to FSF
Emacs is indeed very hard, often much harder than doing the reverse,
simply because our abstractions are usually much more powerful.
In most cases where you just want an image for GUI and a text
alternative for TTYs, there should be a way to kludge up a
restricted API from GNU.
Creating a dumbed-down API implementable on both versions is of course
possible, but that approach is not without problems. Whenever I see
"easymenu" used anywhere, I flinch.
AFAIK the keymap APIs are mostly the same, aren't they?
Not really; for example, they use keymaps to implement menus. "Why
doesn't XEmacs have `define-key-after'?"