You're mixing up a few things.
- Your
(defcustom...)
is essentially irrelevant to the rest, except that it sets the value of variable custom-var
to a given string.
- You need to
C-h f make-symbol
and C-h f intern
. And see (elisp) Creating Symbols.
make-symbol
is a built-in function in ‘C source code’.
(make-symbol NAME)
Return a newly allocated uninterned symbol whose name is NAME
.
Its value is void, and its function definition and property list are nil.
intern
is a built-in function in ‘C source code’.
(intern STRING &optional OBARRAY)
Return the canonical symbol whose name is STRING
.
If there is none, one is created by this function and returned.
A second optional argument specifies the obarray to use;
it defaults to the value of obarray
.
(boundp 'custom-var) ; => t, since you did the `defcustom`.
(boundp (intern "custom-var")) ; => t, since `intern` returns the same symbol.
(boundp (make-symbol "custom-var")) ; => nil. `make-symbol` returns an uninterned symbol.
More succinctly:
(eq (intern "custom-var") (make-symbol "custom-var")) ; => nil.
(eq (make-symbol "custom-var") (make-symbol "custom-var")) ; => nil.
(eq (intern "custom-var") (intern "custom-var")) ; => t.