This programming language may be used to instruct a computer to perform a task.
|Execution method:||Compiled (bytecode)|
If you know Emacs Lisp, please write code for some of the tasks not implemented in Emacs Lisp.
Emacs Lisp (often abbreviated to elisp) is the Lisp implementation used by the Emacs text editor. It doesn't provide all features of Common Lisp (e.g. its optional arguments always default to nil), but it contains special types which are specific for the use in the editor, like buffers (which is where you actually edit the text), windows, events etc.
Lisp expressions can be executed directly from within Emacs editor buffers, or loaded from files which optionally can be compiled into bytecode.
Emacs configuration files actually are Emacs Lisp source files.
Emacs Lisp can be used as a general programming language with the emacs "-batch" or "--script" command line arguments. 
How to run Emacs Lisp code
A simple way to run Emacs code is to switch to the scratch buffer (Buffers -> *scratch*), type in or paste some Lisp code, e.g.:
(+ 1 2 3)
Then (with the cursor behind the closing parenthesis of the Lisp form) press Control-J to evaluate it. The result appears directly below the evaluated code:
(+ 1 2 3)<Ctrl-J> 6
Of course you can also change your code and evaluate it again. To evaluate all code in the current buffer, use "M-x eval-buffer".
Emacs will highlight matching parentheses.
If your code has an error and the debugger window appears, it can be dismissed by placing the cursor in it and then File -> Close like any other buffer.
Lisp code can be added to the user's ~/.emacs file, which is evaluated at startup.
"M-x (=Alt-x) customize" will bring up a menu for customizing default Emacs settings, which will be added to the ~/.emacs file in its Custom section: "Faces -> Basic Faces -> Region" in that menu for example sets the background color of selections. It is a good idea to change this, e.g. to "LightSteelBlue1", because the default setting is a very light gray that is hard to see.
Another useful setting is enabling "Emacs -> Convenience -> Cua -> Cua mode" for the standard Ctrl-X/C/V/Z key bindings that are known from most other applications.
There are also color themes for Emacs, e.g. if you prefer dark mode.
You can also set a different font for Emacs: Evaluate "(font-family-list)" in the scratch buffer. (This may cause some slowness of the editor if you have many fonts installed.) Then search backwards (Ctrl-r) for the font you want, to see its exact name. And finally put the font name and size into your ~/.emacs and restart Emacs, e.g.:
(set-frame-font "Courier Prime-20" nil t)
And finally, if you would like to suppress the welcome screen, put this in your .emacs:
(setq inhibit-startup-screen t)
This category has the following 3 subcategories, out of 3 total.
Pages in category "Emacs Lisp"
The following 167 pages are in this category, out of 167 total.
- Secure temporary file
- Send email
- Shell one-liner
- Sieve of Eratosthenes
- Sine wave
- Sorting algorithms/Insertion sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Sleep sort
- Spinning rod animation/Text
- String append
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip whitespace from a string/Top and tail
- Substring/Top and tail
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of squares
- System time