bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13425: close this bug?


From: Stefan Monnier
Subject: bug#13425: close this bug?
Date: Thu, 02 Feb 2017 19:02:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> +  (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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]