branch: elpa/nix-mode
commit eb7623fb3b23afec25619a76adab6bab5e338bf2
Author: Matthew Bauer <[email protected]>
Commit: Matthew Bauer <[email protected]>

    Handle mmm-mode '' prefixes better
    
    Sometimes we have variables that look like attr'' that Nix handles as a 
name but
    mmm-mode thought was a beginning of a multiline string. This adds some cases
    handling those names to mmm-mode detection.
---
 nix-mode-mmm.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/nix-mode-mmm.el b/nix-mode-mmm.el
index 6c30b67c56..33d5093595 100644
--- a/nix-mode-mmm.el
+++ b/nix-mode-mmm.el
@@ -13,15 +13,15 @@
 (require 'mmm-mode)
 
 (mmm-add-group 'nix-sh
- '((sh-command
-    :submode sh-mode
-    :face mmm-output-submode-face
-    :front "''"
-    :back "''[^$\\]"
-    :include-front t
-    :front-offset 2
-    :end-not-begin t
-    )))
+               '((sh-command
+                  :submode sh-mode
+                  :face mmm-output-submode-face
+                  :front "[^'a-zA-Z]''[^']"
+                  :back "''[^$\\]"
+                  :include-front t
+                  :front-offset 4
+                  :end-not-begin t
+                  )))
 
 (setq mmm-global-mode 'maybe)
 (mmm-add-mode-ext-class 'nix-mode "\\.nix\\'" 'nix-sh)

Reply via email to