Emacs LISP (4) — variable


1、 Reference

Emacs series article directory – updating

2、 Variable

2.1 variable

Emacs LISP (4) -- variable

A variable consists of a symbolsymbolValues bound to symbolsvalueThe bound value can be

Type of value Example
numerical value 10
character string "such as this"
list '(spruce pine oak)
Function definition

2.2 possible errors in explanatory variables

(1) Variables are treated as function names

If there is only one variable in a list, it will be interpreted by the interpreter as the definition of a function


As above,fill-columnIt will be interpreted as a function name because the variable has no bound function*backtrace*The following will appear inerror message

Emacs LISP (4) -- variable

(2) Missing function argument

(+ 1 1)

As above, place the cursor over+After, executeC-c C-e, the interpreter will+As a function name, but found no function arguments

The following error will occur

Emacs LISP (4) -- variable

2.3 parameters of function