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

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

[debbugs-tracker] bug#21328: closed (25.0.50; css-mode: Indenting bracke


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21328: closed (25.0.50; css-mode: Indenting brackets in presence of pseudo-selectors)
Date: Fri, 28 Aug 2015 18:15:02 +0000

Your message dated Fri, 28 Aug 2015 20:14:49 +0200
with message-id <address@hidden>
and subject line Re: bug#21328: 25.0.50; css-mode: Indenting brackets in 
presence of pseudo-selectors
has caused the debbugs.gnu.org bug report #21328,
regarding 25.0.50; css-mode: Indenting brackets in presence of pseudo-selectors
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
21328: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21328
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.50; css-mode: Indenting brackets in presence of pseudo-selectors Date: Sun, 23 Aug 2015 12:57:07 +0200
The current indentation rules in css-mode work well both for a style
where opening brackets are put at the the same line of selectors, like
so: "body { …", and when they are put on their own line, like in the
following example:

body
{
    background: white;

    main
    {
        background: green;
    }
}

However in the presence of a pseudo-class or pseudo-element, the
opening bracket that follows runs amok:

body
{
    background: white;

    main:first
             {
                 background: green;
             }
}

This should be fixed to accommodate both styles. It seems to me that
removing the `smie-rule-hanging-p' test from the following rule fixes
the problem:

(`(:before . "{")
 (when (smie-rule-hanging-p)
   (smie-backward-sexp ";")
   (smie-indent-virtual)))

However I haven't been able to fully understand how SMIE works yet, so
I'm not sure what that check was meant for in the first place, or
whether it breaks some other cases (though I haven't been able to find
such a case).

-- Simen


In GNU Emacs 25.0.50.15 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-08-23 on x240
Repository revision: 7372c1ab067ba93054fbb042cd13211042b83614
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description: Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: CSS

--- End Message ---
--- Begin Message --- Subject: Re: bug#21328: 25.0.50; css-mode: Indenting brackets in presence of pseudo-selectors Date: Fri, 28 Aug 2015 20:14:49 +0200

--- End Message ---

reply via email to

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