Emacs Lisp

Emacs Lisp
Emacs logo
ParadigmFunctional, meta, reflective
FamilyLisp
Designed byRichard Stallman,
Guy L. Steele, Jr.
DeveloperGNU Project
First appeared1985 (1985)
Stable release
29.4 / 22 June 2024 (2024-06-22)
Typing disciplineDynamic, strong
ScopeDynamic, optionally lexical
PlatformEmacs
OSCross-platform
LicenseGPLv3
Filename extensions.el, .elc, .eln
Websitewww.gnu.org/software/emacs
Influenced by
Common Lisp, Maclisp

Emacs Lisp is a Lisp dialect made for Emacs. It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C, as is the Lisp interpreter.

Emacs Lisp code is used to modify, extend and customize Emacs. Those not wanting to write the code themselves the Customize function can be used. It provides a set of preferences pages allowing the user to set options and preview their effect in the running Emacs session. When the user saves their changes, Customize simply writes the necessary Emacs Lisp code to the user's config file, which can be set to a special file that only Customize uses, to avoid the possibility of altering the user's own file.

Besides being a programming language that can be compiled to bytecode[1] and transcompiled to native code,[2] Emacs Lisp can also function as an interpreted scripting language, much like the Unix Bourne shell or Perl, by calling Emacs in batch mode. In this way it may be called from the command line or via an executable file, and its editing functions, such as buffers and movement commands are available to the program just as in the normal mode. No user interface is presented when Emacs is started in batch mode; it simply executes the passed-in script and exits, displaying any output from the script.

Emacs Lisp is also termed Elisp, although there are also older, unrelated Lisp dialects with that name.[3][4]

  1. ^ "Byte compiling Emacs Lisp". GNU Emacs manual. Retrieved 2024-06-14.
  2. ^ "Compilation of Emacs Lisp to native code". GNU Emacs manual. Retrieved 2024-06-14.
  3. ^ "HEDRICK at RUTGERS (Mngr DEC-20's/Dir LCSR Comp Facility" (1981-12-18). ""information about Common Lisp implementation"". Letter to "rpg at SU-AI, jonl at MIT-AI". Archived from the original on 2016-09-20. Retrieved 2019-07-28. We have some experience in Lisp implementation now, since Elisp (the extended implementation of Rutgers/UCI Lisp) is essentially finished.{{cite press release}}: CS1 maint: numeric names: authors list (link)
  4. ^ "Ad for CCA EMACS". Unix Review. December 1984. p. 16. CCA EMACS and Elisp are trademarks of CCA Uniworks, Inc.

Developed by StudentB