]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/textmodes/css-mode.el: Handle variable interpolation
authorSimen Heggestøyl <simenheg@gmail.com>
Thu, 5 Feb 2015 20:29:54 +0000 (15:29 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 5 Feb 2015 20:29:54 +0000 (15:29 -0500)
Fixes: debbugs:19751
* lisp/textmodes/css-mode.el (css-fill-paragraph): Fix filling in presence
of variable interpolation.

lisp/ChangeLog
lisp/textmodes/css-mode.el

index 9838d68f7d32618c5dd6782c6d94fffb35169c22..62c4e9a937c5d66cade58845b62b61680dcb6b00 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-05  Simen Heggestøyl  <simenheg@gmail.com>  (tiny change)
+
+       * textmodes/css-mode.el (css-fill-paragraph): Fix filling in presence
+       of variable interpolation (bug#19751).
+
 2015-02-05  Era Eriksson  <era+emacs@iki.fi>
 
        * json.el (json-end-of-file): New error (bug#19768).
index c171bd50f62b41d7e7219cabb4b6d50becae520e..fbaa486fd2e64b053f435b1784c31596f0ac57f2 100644 (file)
@@ -1,4 +1,4 @@
-;;; css-mode.el --- Major mode to edit CSS files -*- lexical-binding: t -*-
+;;; css-mode.el --- Major mode to edit CSS files  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2006-2015 Free Software Foundation, Inc.
 
               (cond
                ;; This is a false positive inside a string or comment.
                ((nth 8 (syntax-ppss)) nil)
+               ;; This is a false positive when encountering an
+               ;; interpolated variable (bug#19751).
+               ((eq (char-before (- (point) 1)) ?#) nil)
                ((eq (char-before) ?\})
                 (save-excursion
                   (forward-char -1)
                   (skip-chars-backward " \t")
-                  (unless (bolp) (newline))))
+                  (when (and (not (bolp))
+                             (scss-smie--not-interpolation-p))
+                    (newline))))
                (t
                 (while
                     (progn