Subject: Re: bug#13425: close this bug?

From: Stefan Monnier <[email-masked]>
Date: Thu, 02 Feb 2017 19:02:57 -0500

> +  (save-excursion
> +    (re-search-forward "[{};)]" nil t)
> +    (eq (char-before) ?\{)))

Looks OK.  It will get confused if there's a comment jut at the wrong
place with one of ";{})" inside, which is not unheard of.  It's good
enough for now, but a solution I've used frequently with SMIE is to call
a "tokenize-backward" (usually a less discriminating one than the actual
backward tokenizer I give to SMIE, to avoid inf-recursion) repeatedly
rather than using a regexp-search.

        Stefan