Emacs Common Lisp is an implementation of CommonLisp written in EmacsLisp. That means you can run CommonLisp programs in Emacs, and you can write Emacs extensions (including interactive functions) in CommonLisp. At this stage, most of ANSI Common Lisp is implemented, but CLOS and pretty printing are missing. For more information, see the README file.

Go to http://mailman.nocrew.org/cgi-bin/mailman/listinfo/emacs-cl for a mailing list for discussion about Emacs Common Lisp.

There hasn’t been a release yet, but the software can be accessed from GitHub. Browse the CVS repository here: http://github.com/larsbrinkhoff/emacs-cl

See also CommonLispForEmacs.

Writing an interactive Emacs command in CommonLisp mini-HOWTO:

Load Emacs Common Lisp, start the interactive mode with “M-x emacs-cl”, and enter this function at the prompt:

    (defun el:|my-fun| (str)
      "My interactive function."
      (declare (interactive "sWhat, you say? "))
      (el:|message| "Good news, every one: %s" str))

The “el:” prefix refers to symbols in the EMACS-LISP package. Those symbol names are quoted to make them lower case.

Now, try it with “M-x my-fun”.

But … why?!

Exactly! I mean, not, why CommonLisp, but why not write EmacsLisp in CommonLisp instead? Maybe developing in stages:

  1. EL interpreter interpreting old EL code.
  2. EL compiler compiling old EL code to CL. CL interpreting.
  3. Compile the translated code with someone’s CL compiler so it loads as a binary.
  4. Hand-optimized CL code.
  5. Maybe re-organize some conventions to work more naturally with CL (changing EL compiler to translate into these).

That way, Emacs could be interpreted or compiled by anyone’s CommonLisp, & Emacs macros would be more immediately workable by CL programmers, EL section of manual would be less important.

I’m neither an EmacsLisp nor CommonLisp user or fan, just curious why.

Common Lisp programmers aren’t really interested in using Emacs Lisp programs such as Gnus or EMMS in a Common Lisp Emacs such as Climacs. That’s because Emacs Lisp programs are generally inferior to C or Common Lisp programs, due Emacs’ poor support for GUI programming, lack of support for C FFI and poor IO support. Just see how long Gnus takes to load a news group with 40k messages.

Common Lisp Emacsen don’t plan to incorporate non-text-editing-related functionality. This functionality is best implemented as other CLIM programs, of course running in the same image.

From <http://www.gnu.org/gnu/rms-lisp.html>:

We’re willing to extend it some now, but we don’t want to extend it to the level of common Lisp. I implemented Common Lisp once on the Lisp machine, and I’m not all that happy with it. One thing I don’t like terribly much is keyword arguments. They don’t seem quite Lispy to me; I’ll do it sometimes but I minimize the times when I do that.

I can’t find any of the links pointing to the nocrew.org site that are actually valid. Does anyone know if this project is still active in any way? --mon key

Sorry, the old links were broken. I have updated them. – LarsBrinkhoff

Is this the same cl package that is part of Emacs? – JonasBernoulli

No, it’s not. – LarsBrinkhoff

CategoryCode CategoryExtensionLanguage