4 ms·
Emacs has a lot of cruft on the code-level. The worst part is the lack of separation between "backend" and "frontend". There is support for many different "fro
by jpfr 6y ago
Emacs has a lot of cruft on the code-level.
The worst part is the lack of separation between "backend" and "frontend".
There is support for many different "frontend" architectures:
Win32/MacOS/Gtk/<Motif and many more old X11 toolkits>
But a lot of code was just duplicated when a new frontend architecture was added.
And started to grow into different directions.
The code is littered with #ifdef and there is no clear API for the fronted architectures to sit on top of.
For example, font handling is different for most frontends.
And this difference leaks into the core part of Emacs where line-breaks are managed, etc.
There is work towards a "pure GTK" that uses Cairo as a drawing surface.
https://github.com/masm11/emacs https://github.com/masm11/emacs
Imho the Cairo "drawing surface" and font handling should be the only implementation for what it does and reused for all frontend architectures. With the exception of terminal sessions...
But, Emacs devs are very conservative when it comes to "modernize".
In my experience, it is a lot easier to add stuff than to clean up.
That also explains the forest of #ifdef and accumulation of cruft.