ARCHIVED: In Emacs, what is byte-compilation?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Byte-compilation is a function of Emacs that transforms Lisp into byte-code. Byte-code, run by an interpreter in Emacs, can be executed more quickly than Lisp. However, because it isn't written in machine code, it can be directly transferred between machines without having to be recompiled. Functions byte-compiled by earlier versions of Emacs can be correctly interpreted by Emacs, but the opposite is not necessarily true.

To byte-compile a file, launch Emacs and enter:

  M-x byte-compile-file RET [file to byte-compile]

Replace [file to byte-compile] with the name of the file you want to compile. The compiler will take the file, which should end in the extension .el, and create a byte-code version with the extension .elc.

Note: For more information on how to enter the command above, see How keystrokes are denoted in Emacs

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

This is document aaxv in the Knowledge Base.
Last modified on 2018-01-18 10:37:30.

Contact us

For help or to comment, email the UITS Support Center.