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?

1 Answer 1


Section 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.