When I reload my init file I get an error (or warning) saying
unescaped character literals `?(', `?)', `?[', `?]' detected!
What does this error (warning) mean and how can one fix it?
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 communityWhen I reload my init file I get an error (or warning) saying
unescaped character literals `?(', `?)', `?[', `?]' detected!
What does this error (warning) mean and how can one fix it?
Section 2.3.3.1 Basic Char Syntax of the Elisp manual says:
The usual read syntax for alphanumeric characters is a question mark
followed by the character; thus, ‘?A’ for the character ‘A’, ‘?B’ for
the character ‘B’, and ‘?a’ for the character ‘a’.
For example:
?Q ⇒ 81 ?q ⇒ 113
You can use the same syntax for punctuation characters. However, if
the punctuation character has a special syntactic meaning in Lisp, you
must quote it with a ‘\’. For example, ‘?\(’ is the way to write the
open-paren character. Likewise, if the character is ‘\’, you must use a
second ‘\’ to quote it: ‘?\\’.
Your init file contains ?(
but Emacs prefers to see ?\(
. The same goes for the other three characters mentioned in the warning.
You can load the Elisp manual inside Emacs with C-h i
.