The intention is that "\\<\\>" will never match at all, hence that match-end will never be executed. "\\<" means "beginning of word" and "\\>" means "end of word". Could there be something in your environment whereby an end of word might be at the same position as the beginning of a word? If this is the case, then I will need to come up with an actual regexp which can never match anything. It matchs when cursor is between a Chinese char and an ASCII char like “你hao”( cursor before ‘h’). Is the bug reproducible? Yes. See https://github.com/joaotavora/yasnippet/issues/923#issuecomment-376569337 If so, could you possibly patch that bit of code to add (not (equal c-opt-cpp-prefix "\\<\\>")) before the (looking-at ...) form, and see if that stops the error. No. the value of c-opt-cpp-prefix printed as "\s *#\s *”.