diff --git a/content/cftbat/basic-emacs.html b/content/cftbat/basic-emacs.html index 4f61365c..1e56e83d 100644 --- a/content/cftbat/basic-emacs.html +++ b/content/cftbat/basic-emacs.html @@ -112,7 +112,7 @@

Emacs Is a Lisp Interpreter

Modes

An Emacs mode is a collection of key bindings and functions that are packaged together to help you be productive when editing different types of files. (Modes also do things like tell Emacs how to do syntax highlighting, but that’s of secondary importance, and I won’t cover that here.)

For example, when you’re editing a Clojure file, you’ll want to load Clojure mode. Right now I’m writing a Markdown file and using Markdown mode, which has lots of useful key bindings specific to working with Markdown. When editing Clojure, it’s best to have a set of Clojure-specific key bindings, like C-c C-k to load the current buffer into a REPL and compile it.

-

Modes come in two flavors: major modes and minor modes. Markdown mode and Clojure mode are major modes. Major modes are usually set by Emacs when you open a file, but you can also set the mode explicitly by running the relevant Emacs command, for example with M-x clojure-mode or M-x major-mode. Only one major mode is active at a time.

+

Modes come in two flavors: major modes and minor modes. Markdown mode and Clojure mode are major modes. Major modes are usually set by Emacs when you open a file, but you can also set the mode explicitly by running the relevant Emacs command, for example with M-x clojure-mode or M-x markdown-mode. Only one major mode is active at a time.

Whereas major modes specialize Emacs for a certain file type or language, minor modes usually provide functionality that’s useful across file types. For example, abbrev mode “automatically expands text based on pre-defined abbreviation definitions” (per the Emacs manual1.). You can have multiple minor modes active at the same time.

You can see which modes are active on the mode line, as shown in Figure 2-7.