Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from dgreensp/master
Browse files Browse the repository at this point in the history
Don't interpret ' and " in single-line comments
  • Loading branch information
valpackett committed Apr 9, 2013
2 parents 9704c24 + 4a1e018 commit c7aa6a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions less-mode.el
Expand Up @@ -23,8 +23,7 @@
(require 'compile)

(defconst less-font-lock-keywords
'(("@[^\s:;]+" . font-lock-constant-face)
("//.*$" . font-lock-comment-face)))
'(("@[^\s:;]+" . font-lock-constant-face)))

(defgroup less nil
"Less mode"
Expand Down Expand Up @@ -78,6 +77,11 @@
(run-hooks 'css-mode-hook)
(when (featurep 'flymake) (flymake-mode t))
(font-lock-add-keywords nil less-font-lock-keywords)
;; Add the single-line comment syntax ('//', ends with newline)
;; as comment style 'b' (see "Syntax Flags" in elisp manual)
(modify-syntax-entry ?/ ". 124" css-mode-syntax-table)
(modify-syntax-entry ?* ". 23b" css-mode-syntax-table)
(modify-syntax-entry ?\n ">" css-mode-syntax-table)
(add-hook 'after-save-hook 'less-compile-maybe nil t))

(provide 'less-mode)
Expand Down

0 comments on commit c7aa6a8

Please sign in to comment.