Is it possible to write custom primitives for GNU Emacs using C?

GNU Emacs is easily distributed using Emacs Lisp. In some cases, you can hit the performance wall even after composing a byte. In this situation, it would be useful to write C functions that you could call from Emacs Lisp code. Is it possible? How do you do it? Is there any sample code?

+4
source share
2 answers

Is this (Writing Emacs Primitives) what you are looking for?

+5
source

There is no interface for this, and if you are not trying to do something like image / video processing in emacs, I do not see this being useful. C does not automatically speed things up if you cannot get around expensive data structures and work with data in your view. If your C code was supposed to work with elisp data structures, it would not be significantly faster than elisp, and would probably be slower than elisp if anyone ever worried about making elisp a highly optimized environment. ..

+4
source

All Articles