Subject: bug#15467: closed (Re: bug#15467: CSS-mode gives weird indentation when you put opening bracket on its own line)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 04 Oct 2013 21:47:02 +0000

Your bug report

#15467: CSS-mode gives weird indentation when you put opening bracket on its own line

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15467: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15467
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#15467: CSS-mode gives weird indentation when you put opening bracket on its own line
From: Stefan Monnier <[email-masked]>
To: Paul Pogonyshev <[email-masked]>
Cc: [email-masked]
Date: Fri, 04 Oct 2013 17:46:15 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> For example, if you create a CSS buffer and put
> .xxx
> {
> }
> into it, indentation adds one space before '{'. Confusingly, if you add one

Indeed, thanks.  Should be fixed now in the trunk thanks to the
patch below.

        Stefan

--- lisp/textmodes/css-mode.el	2013-08-29 21:00:18 +0000
+++ lisp/textmodes/css-mode.el	2013-10-04 21:40:55 +0000
@@ -302,6 +302,7 @@
   (pcase (cons kind token)
     (`(:elem . basic) css-indent-offset)
     (`(:elem . arg) 0)
+    (`(:list-intro . "") t)             ;"" stands for BOB (bug#15467).
     (`(:before . "{") (if (smie-rule-hanging-p)
                          (smie-rule-parent 0)))))

Subject: CSS-mode gives weird indentation when you put opening bracket on its own line
From: Paul Pogonyshev <[email-masked]>
To: [email-masked]
Date: Thu, 26 Sep 2013 16:23:42 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

For example, if you create a CSS buffer and put

.xxx
{
}

into it, indentation adds one space before '{'. Confusingly, if you add one
or more empty line at the start (i.e. before this only rule), indentation
is back to normal, with '{' in the column 0. However, this seems to apply
only to the very first rule, all others are always broken.

Paul