unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Simen Heggestøyl" <simenheg@gmail.com>
To: 19751@debbugs.gnu.org
Subject: bug#19751: 25.0.50; scss-mode: interpolated variable filling
Date: Tue, 03 Feb 2015 00:09:50 +0100	[thread overview]
Message-ID: <1422918590.18752.0@smtp.gmail.com> (raw)
In-Reply-To: <1422917955.17132.0@smtp.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

I'm not entirely sure what's going on here, but something along the
following lines seems to fix it:

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index c171bd5..7d364d4 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -401,11 +401,16 @@
               (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.
+               ((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

[-- Attachment #2: Type: text/html, Size: 2021 bytes --]

  reply	other threads:[~2015-02-02 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 22:59 bug#19751: 25.0.50; scss-mode: interpolated variable filling Simen Heggestøyl
2015-02-02 23:09 ` Simen Heggestøyl [this message]
2015-02-05 20:32   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422918590.18752.0@smtp.gmail.com \
    --to=simenheg@gmail.com \
    --cc=19751@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).