From: Simen Heggestøyl Date: Fri, 28 Aug 2015 17:36:10 +0000 (+0200) Subject: Fix indentation rule in css-mode X-Git-Tag: emacs-25.0.90~1230^2~36 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c6af816affb36d512f806725518e6e5f2353b197;p=emacs.git Fix indentation rule in css-mode * lisp/textmodes/css-mode.el (css-smie-rules): Fix indentation of brackets in presence of pseudo-selectors. (Bug#21328) --- diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index d73780caf36..639456dc77e 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -344,7 +344,7 @@ (`(:elem . arg) 0) (`(:list-intro . ,(or `";" `"")) t) ;"" stands for BOB (bug#15467). (`(:before . "{") - (when (smie-rule-hanging-p) + (when (or (smie-rule-hanging-p) (smie-rule-bolp)) (smie-backward-sexp ";") (smie-indent-virtual))) (`(:before . ,(or "{" "(")) diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css index 67a6b1e30b5..2f04e967648 100644 --- a/test/indent/css-mode.css +++ b/test/indent/css-mode.css @@ -36,3 +36,8 @@ a.b:c,d.e:f,g[h]:i,j[k]:l,.m.n:o,.p.q:r,.s[t]:u,.v[w]:x { /* bug:20282 */ div.x3 { } + +article:hover +{ + color: black; +}