I just encountered this behavior of Emacs.
This works:
(require 'test)
But this doesn't
(require (make-symbol "test"))
Why is that and can I workaround it somehow?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI just encountered this behavior of Emacs.
This works:
(require 'test)
But this doesn't
(require (make-symbol "test"))
Why is that and can I workaround it somehow?
OK, it looks like the symbol needs to be "interned". http://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-Symbols.html
This works as expected:
(require (intern "test"))
(file-error "Cannot open load file" "test")
.
– Dan♦
Sep 9 '15 at 21:17
intern
instead ofmake-symbol
? Why do you wantmake-symbol
? – npostavs Sep 9 '15 at 20:50(equal 'test (intern "test"))
=> t,(equal 'test (make-symbol "test"))
=> nil,(equal (make-symbol "test") (make-symbol "test"))
=> nil. A symbol is not a name, a symbol has a name. – Jordon Biondo Sep 9 '15 at 21:02