branch: elpa/sass-mode commit 69fc32b97de305251bbca59e1b57658aa7a034f8 Author: Daniel Luna <dancl...@gmail.com> Commit: Daniel Luna <dancl...@gmail.com>
Adding sass-before-eval-hook. --- sass-mode.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sass-mode.el b/sass-mode.el index 2c636bd..d8a56ec 100644 --- a/sass-mode.el +++ b/sass-mode.el @@ -50,6 +50,11 @@ :type 'string :group 'sass) +(defcustom sass-before-eval-hook nil + "Hook run in the buffer used as input to the `sass' command." + :type 'hook + :group 'sass) + (defvar sass-non-block-openers '("^.*,$" ;; Continued selectors "^ *@\\(extend\\|debug\\|warn\\|include\\|import\\)" ;; Single-line mixins @@ -241,6 +246,7 @@ Called from a program, START and END specify the region to indent." (with-temp-buffer (insert region-contents) (newline-and-indent) + (run-hooks 'sass-before-eval-hook) (sass--remove-leading-indent) (shell-command-on-region (point-min) (point-max) (mapconcat #'identity (list "sass" sass-command-options "--stdin") " ") output-buffer