The quote introduces an unevaluated value, not pre-evaluated, whatever that means.
When the expression (quote X)
is treated as a form to be evaluated, it simply evaluates to X
itself. X
is not treated as a form to be evaluated to a value, but rather the resulting value is the syntax X
itself.
Quote is a way of the program expressing, "I want to use a piece of my own syntax as a value". And that's precisely what a "literal" is in computer science: a piece of program text reflected back into the program as a run-time value.
In Lisp, atoms other than symbols denote themselves when evaluated. The syntax 3
evaluates to the integer 3
. They are the same thing: Lisp syntax is a data structure, and in that data structure, an integer literal 3
is already represented by the object that it denotes.
Thus, under evaluation, there is no difference between (quote 3)
and just 3
. "Give me the syntax 3 itself" and "give me the value of the syntax 3" are the same: just 3.
Under (quote (1 2 3))
, the syntax being quoted is (1 2 3)
. That syntax is the list object that it looks like; quote just regurgitates it. If were to evaluate the (1 2 3)
form, it would be an error: it looks like 1
is being used as an operator or function, with arguments 2
and 3
. When quote
is itself evaluated, it suppresses this evaluation and just yields the (1 2 3)
as-is.
Because the (1 2 3)
is a piece of the program syntax, however, there is a restriction in the language that this list may not be modified. An operation like (inc (car (quote (1 2 3))))
which tries to change the list to (2 2 3)
invokes undefined behavior. Essentially, the program is trying to modify its own syntax; if for a moment we disregard the additional complexity that Lisp is a compiled language, this is de facto self-modifying code.