Fix #2. Improve setting error detection regexps

This commit fixes compilation in Emacs 23.