Table of Contents

How much Lisp and C are in Emacs?

By Colin on 2023-08-15, updated 2025-02-24

Emacs is largely a Lisp program, but has a C core. What's the ratio of SLOC between the two languages, and how have they changed over time?

Note that:

  • C code looked for under src/.
  • Lisp code looked for under lisp/.
  • C sources in lib/ and lib-src/ are not counted (see README).
  • C header files are ignored.
  • Comment/blank lines are ignored.
Emacs VersionLines of LispNew Lisp (%)Lines of CNew C (%)Lisp/C Ratio
30.112459053.7435477515.623.51
29.412010025.2130683518.943.91
28.211415283.752579812.184.42
27.211002371.722524767.074.36
26.310815611.872357914.154.59
25.310617231.862263884.894.69
24.510423572158304.83

Between 28 and 29 we see a 19% increase in the size of the C. I wonder what changed? Perhaps the PGTK backend?

For 30, the increase in C is likely due to the new native JSON parser.

Blog Archive