We can investigate this process by evaluating another addition example. In summary, evaluating a symbolic expression most commonly causes the Lisp interpreter to return a value and perhaps carry out a side effect; or else produce an error. Actions that we humans think are important, such as printing results, are often “side effects” to the Lisp interpreter. At the same time the interpreter returns a value, it may do something else as well, such as move a cursor or copy a file; this other kind of action is called a side effect.
What we have discussed thus far should help you make sense of all these nested parentheses you will be dealing with when working with Emacs Lisp. Though what we are interested in at present is to understand how we can have my-name be both a variable and a function which we tell apart based on how they are used in context. What you read here looks exactly like the function calls we discussed in the previous examples. Though you will eventually want to control when something is evaluated.
Incidentally, the atoms that make up our universe were named such when they were thought to be indivisible; but it has been found that physical atoms are not indivisible. The printed representation of both atoms and lists are called symbolic expressions or, more concisely, s-expressions. A list can have just one atom in it or have nothing in it at all. Technically speaking, a list in Lisp consists of parentheses surrounding atoms separated by whitespace or surrounding other lists or surrounding both atoms and other lists. In a list, atoms are separated from each other by whitespace.
Using defun, you write an interactive function (i.e. a “command”) to unconditionally move down 15 lines using forward-line internally (Basics of how Lisp works). At any rate, because Emacs effectively is one large mutable state, you have to write code that does not produce permanent side effects that are not necessary. You may then choose to either widen or narrow-to-region (and related commands like org-narrow-to-subtree), do what you must, and then restore the buffer read more at damtp.cam.ac.uk to its original state. Another use-case for match data is if you are writing fontification rules for a major or minor mode, though that is probably more of a niche requirement (What are major and minor modes). If all you want is to check for a regular expression in the buffer, you wrap your search in a save-match-data.
I will not delve into the technicalities here, as I want the book to be useful long-term, focusing on the principles rather than the implementation details that might change over time. While Lisp macros are written in Emacs Lisp, the same way as everything else you see in this book. From a user perspective, there is no distinction between special forms and Lisp macros. Things work fine with let because it internally does the quoting of its LIST-OF-LISTS-AS-VARIABLE-BINDINGS. Otherwise, it would be evaluated, in which case the first element would be the name of the function. Continuing with the theme of special forms, if let was a typical function call, the LIST-OF-LISTS-AS-VARIABLE-BINDINGS would have to be quoted.
On the other hand, unlike an atom, a list can be split into parts. This term comes from the historical meaning of the word atom, which means `indivisible’. In Lisp, what we have been calling words are called atoms.
As in English, the meanings of the component letters of a Lisp atom are different from the meaning the letters make as a word. As far as list operations are concerned, the atoms of a list are unsplittable. In Lisp, certain kinds of atom, such as an array, can be separated into parts; but the mechanism for doing this is different from the mechanism for splitting a list. Physical atoms were named prematurely, before their truer nature was found. Parts can split off an atom or it can fission into two parts of roughly equal size.
If the pattern matches, the elements of the list are bound to the corresponding elements returned by argument. This is common for macros (Evaluation inside of a macro or special form). Consider how my examples in this book make repetitive use of message, when in reality the only part that changes is the actual string/argument passed to that function. At any rate, this is where the pcase Lisp macro comes in (Evaluation inside of a macro or special form). What is usually autoloaded are commands, though variables can be handled the same way.