emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sass-mode e0c9198 29/31: Merge pull request #24 from dclun


From: ELPA Syncer
Subject: [nongnu] elpa/sass-mode e0c9198 29/31: Merge pull request #24 from dcluna/add-pre-eval-hook-and-options
Date: Sun, 29 Aug 2021 11:29:42 -0400 (EDT)

branch: elpa/sass-mode
commit e0c919872bc8ee5f7d0e8e8024b9a3cd8ff92c97
Merge: 7f0df85 69fc32b
Author: Steve Purcell <steve@sanityinc.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #24 from dcluna/add-pre-eval-hook-and-options
    
    Adding pre-eval hook function and sass-command-options
---
 sass-mode.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/sass-mode.el b/sass-mode.el
index e271907..d8a56ec 100644
--- a/sass-mode.el
+++ b/sass-mode.el
@@ -45,6 +45,16 @@
   :type 'integer
   :group 'sass)
 
+(defcustom sass-command-options nil
+  "Options to pass to the `sass' command."
+  :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
@@ -236,8 +246,9 @@ 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) "sass --stdin"
+             (shell-command-on-region (point-min) (point-max) (mapconcat 
#'identity (list "sass" sass-command-options "--stdin") " ")
                                       output-buffer
                                       nil
                                       errors-buffer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]