Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Drop sass support; there's a separate flymake-sass now

  • Loading branch information...
commit 1df198e05458ec207d9f71304c71d9b63ee9c554 1 parent d424adc
@purcell authored
Showing with 6 additions and 15 deletions.
  1. +6 −15 flymake-haml.el
View
21 flymake-haml.el
@@ -1,4 +1,4 @@
-;;; flymake-haml.el --- Flymake handler for haml-mode and sass-mode files
+;;; flymake-haml.el --- Flymake handler for haml files
;;
;;; Author: Steve Purcell <steve@sanityinc.com>
;;; URL: https://github.com/purcell/flymake-haml
@@ -9,37 +9,28 @@
;; Usage:
;; (require 'flymake-haml)
;; (add-hook 'haml-mode-hook 'flymake-haml-load)
-;; (add-hook 'sass-mode-hook 'flymake-sass-load)
(require 'flymake)
(defvar flymake-haml-err-line-patterns '(("^Syntax error on line \\([0-9]+\\): \\(.*\\)$" nil 1 nil 2)))
-(defvar flymake-haml-allowed-file-name-masks '((".+\\.\\(haml\\)$" flymake-haml-init)
- (".+\\.\\(sass\\)$" flymake-sass-init)))
-
;; Invoke utilities with '-c' to get syntax checking
(defun flymake-haml-init ()
(list "haml" (list "-c" (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))))
-(defun flymake-sass-init ()
- (list "sass" (list "-c" (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-inplace))))
;;;###autoload
(defun flymake-haml-load ()
- "Configure flymake mode to check the current buffer's haml/sass syntax.
+ "Configure flymake mode to check the current buffer's haml syntax.
-This function is designed to be called in `sass-mode-hook' or
-`haml-mode-hook'; it does not alter flymake's global
-configuration, so `flymake-mode' alone will not suffice."
+This function is designed to be called in `haml-mode-hook'; it
+does not alter flymake's global configuration, so `flymake-mode'
+alone will not suffice."
(interactive)
- (set (make-local-variable 'flymake-allowed-file-name-masks) flymake-haml-allowed-file-name-masks)
+ (set (make-local-variable 'flymake-allowed-file-name-masks) '(("." flymake-haml-init)))
(set (make-local-variable 'flymake-err-line-patterns) flymake-haml-err-line-patterns)
(if (executable-find "haml")
(flymake-mode t)
(message "Not enabling flymake: haml command not found")))
-(defalias 'flymake-sass-load 'flymake-haml-load)
-
(provide 'flymake-haml)
;;; flymake-haml.el ends here
Please sign in to comment.
Something went wrong with that request. Please try again.