GNU bug report logs - #13425
new css-mode indenter

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Sun, 13 Jan 2013 07:45:01 UTC

Severity: wishlist

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 13425 <at> debbugs.gnu.org, Tom Tromey <tom <at> tromey.com>
Subject: bug#13425: close this bug?
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




This bug report was last modified 8 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.