aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes/css-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/css-mode.el')
-rw-r--r--lisp/textmodes/css-mode.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index c171bd50f62..f6a3ca64dd9 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1,4 +1,4 @@
1;;; css-mode.el --- Major mode to edit CSS files -*- lexical-binding: t -*- 1;;; css-mode.el --- Major mode to edit CSS files -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2006-2015 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2015 Free Software Foundation, Inc.
4 4
@@ -401,11 +401,16 @@
401 (cond 401 (cond
402 ;; This is a false positive inside a string or comment. 402 ;; This is a false positive inside a string or comment.
403 ((nth 8 (syntax-ppss)) nil) 403 ((nth 8 (syntax-ppss)) nil)
404 ;; This is a false positive when encountering an
405 ;; interpolated variable (bug#19751).
406 ((eq (char-before (- (point) 1)) ?#) nil)
404 ((eq (char-before) ?\}) 407 ((eq (char-before) ?\})
405 (save-excursion 408 (save-excursion
406 (forward-char -1) 409 (forward-char -1)
407 (skip-chars-backward " \t") 410 (skip-chars-backward " \t")
408 (unless (bolp) (newline)))) 411 (when (and (not (bolp))
412 (scss-smie--not-interpolation-p))
413 (newline))))
409 (t 414 (t
410 (while 415 (while
411 (progn 416 (progn
@@ -450,7 +455,7 @@
450(defun scss-smie--not-interpolation-p () 455(defun scss-smie--not-interpolation-p ()
451 (save-excursion 456 (save-excursion
452 (forward-char -1) 457 (forward-char -1)
453 (or (zerop (skip-chars-backward "[:alnum:]")) 458 (or (zerop (skip-chars-backward "-[:alnum:]"))
454 (not (looking-back "#{\\$" (- (point) 3)))))) 459 (not (looking-back "#{\\$" (- (point) 3))))))
455 460
456;;;###autoload (add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode)) 461;;;###autoload (add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode))