When you call a function by name and provide inputs, the code in that function executes and applies some kind of change in Emacs. A list is an ordered collection of expressions: symbols, values, or lists.Ī function is a higher-level unit of code that has a name and accepts a certain number of inputs. This is a list expression (wrapped in parentheses) that represents a "call" to a function named setq.Īn expression is an unit of code that can be evaluated to produce a result. ( setq inhibit-startup-message t) Comment at end of line! Let's take a look at how you would set a configuration variable and then we'll break down the syntax to understand Emacs Lisp a little better: Enable or disable features by calling functions.Configure features by setting variables.The two most common things you will do in your init.el file: Now that we're in our init.el file, let's learn how you can actually configure Emacs with it! Your init.el should go in one of the places I mentioned above!Įmacs Manual: The Emacs Initialization File ¶The basics of configuration This file typically does not exist by default, so you will probably have to create it! We'll use C-x C-f (Ctrl+X then Ctrl+F) to open this file for editing.īe aware that I'm editing my init.el from a different folder than the default! That's because I'm isolating it from my own Emacs configuration. ~/.config/emacs/init.el - Follows Linux desktop environment guidlines (recommended on Linux!)Įmacs will look for a configuration file in each of these locations every time it starts up!.~/.emacs.d/init.el - The main configuration file in the Emacs config folder (recommended on macOS and Windows).~/.emacs or ~/.emacs.el - The old location for the configuration file (not recommended!). Here are the places where you might find the main configuration file: This means that your Emacs configuration is actually code! Don't worry, I'll explain everything. The primary way to configure Emacs is to edit its configuration file which is written in a language called Emacs Lisp.
0 Comments
Leave a Reply. |