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

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

[nongnu] elpa/sass-mode 69fc32b 28/31: Adding sass-before-eval-hook.


From: ELPA Syncer
Subject: [nongnu] elpa/sass-mode 69fc32b 28/31: Adding sass-before-eval-hook.
Date: Sun, 29 Aug 2021 11:29:41 -0400 (EDT)

branch: elpa/sass-mode
commit 69fc32b97de305251bbca59e1b57658aa7a034f8
Author: Daniel Luna <dancluna@gmail.com>
Commit: Daniel Luna <dancluna@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



reply via email to

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